Перевёл dotfiles на stow
This commit is contained in:
parent
27416cef99
commit
97af93b2a8
169 changed files with 1256 additions and 100 deletions
54
config/nvim/lua/plugins/tree.lua
Normal file
54
config/nvim/lua/plugins/tree.lua
Normal file
|
@ -0,0 +1,54 @@
|
|||
local WIDTH_RATIO = 0.25
|
||||
|
||||
return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
opts = {
|
||||
disable_netrw = true,
|
||||
hijack_netrw = true,
|
||||
sort = {
|
||||
sorter = "case_sensitive",
|
||||
},
|
||||
view = {
|
||||
width = function()
|
||||
return math.floor(vim.opt.columns:get() * WIDTH_RATIO)
|
||||
end,
|
||||
adaptive_size = true,
|
||||
centralize_selection = true,
|
||||
},
|
||||
git = {
|
||||
enable = true,
|
||||
},
|
||||
renderer = {
|
||||
group_empty = true,
|
||||
highlight_git = true,
|
||||
icons = {
|
||||
show = {
|
||||
git = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
},
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<C-c>",
|
||||
function()
|
||||
local api = require("nvim-tree.api")
|
||||
local global_cwd = vim.fn.getcwd(-1, -1)
|
||||
api.tree.change_root(global_cwd)
|
||||
end,
|
||||
noremap = true,
|
||||
silent = true,
|
||||
desc = "Change tree root to CWD",
|
||||
},
|
||||
{ "<F3>", ":NvimTreeToggle<CR>", noremap = true, silent = true, desc = "Toggle file tree" },
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue