Nvim tree changes

This commit is contained in:
2023-07-03 12:57:29 +02:00
parent cb615d9a8c
commit 8d86857b48
2 changed files with 20 additions and 7 deletions

View File

@@ -1,15 +1,24 @@
local setup, nvimtree = pcall(require, "nvim-tree")
if not setup then
return
return
end
nvimtree.setup({
sync_root_with_cwd = true,
view = {
width = 30,
}
},
git = {
ignore = false,
},
filters = {
dotfiles = false,
custom = {
"node_modules",
".git"
},
exclude = {
".gitignore"
}
},
})
-- hacky keybinding to change root dir
vim.keymap.set("n", "<leader>tr", function ()
require("nvim-tree.api").tree.change_root(vim.fn.getcwd())
end, {desc = "Change root dir to current dir"}
)