modified architecture
This commit is contained in:
51
lua/plugins/nvim_tree.lua
Normal file
51
lua/plugins/nvim_tree.lua
Normal file
@@ -0,0 +1,51 @@
|
||||
local config = require("config").plugins.nvim_tree
|
||||
local mappings = config.mappings
|
||||
|
||||
return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
|
||||
config = function()
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
local nvim_tree = require("nvim-tree")
|
||||
|
||||
nvim_tree.setup({
|
||||
view = {
|
||||
width = 30,
|
||||
side = "left"
|
||||
},
|
||||
|
||||
git = {
|
||||
enable = true
|
||||
},
|
||||
|
||||
renderer = {
|
||||
highlight_git = true
|
||||
},
|
||||
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
custom = {
|
||||
".git"
|
||||
}
|
||||
},
|
||||
|
||||
update_cwd = true,
|
||||
|
||||
update_focused_file = {
|
||||
enable = true
|
||||
}
|
||||
})
|
||||
|
||||
vim.keymap.set("n", mappings.toggle_file_explorer, ":NvimTreeToggle<CR>", {
|
||||
desc = "Toggle file explorer",
|
||||
noremap = true,
|
||||
silent = true
|
||||
})
|
||||
end
|
||||
}
|
||||
Reference in New Issue
Block a user