nvim/lua/plugs/nvimtree.lua
2023-11-22 23:19:24 +08:00

32 lines
680 B
Lua

return {
'kyazdani42/nvim-web-devicons',
{
"nvim-tree/nvim-tree.lua",
config = function ()
require'nvim-tree'.setup {
sort_by = "case_sensitive",
view = {
width = 30,
},
filters = { dotfiles = true, },
git = { enable = true },
on_attach = function (bufnr)
local api = require'nvim-tree.api'
api.config.mappings.default_on_attach(bufnr)
-- override a default
G.delmap({
{'n', '<C-e>', { buffer = bufnr }},
})
end
}
G.map({
{"n", "<C-e>", ":NvimTreeToggle<CR>", { noremap = true }},
})
end
}
}