2023-10-01 17:18:36 +08:00
|
|
|
return {
|
2023-11-15 12:56:11 +08:00
|
|
|
'kyazdani42/nvim-web-devicons',
|
|
|
|
{
|
2023-11-22 23:19:24 +08:00
|
|
|
"nvim-tree/nvim-tree.lua",
|
2023-11-24 12:59:48 +08:00
|
|
|
keys = {
|
|
|
|
"<c-e>"
|
|
|
|
},
|
2023-11-15 12:56:11 +08:00
|
|
|
config = function ()
|
2023-11-22 23:19:24 +08:00
|
|
|
|
2023-11-15 12:56:11 +08:00
|
|
|
require'nvim-tree'.setup {
|
|
|
|
sort_by = "case_sensitive",
|
2023-11-22 23:19:24 +08:00
|
|
|
view = {
|
|
|
|
width = 30,
|
|
|
|
},
|
2023-11-15 12:56:11 +08:00
|
|
|
filters = { dotfiles = true, },
|
2023-11-15 13:16:34 +08:00
|
|
|
git = { enable = true },
|
2023-11-22 23:19:24 +08:00
|
|
|
on_attach = function (bufnr)
|
|
|
|
local api = require'nvim-tree.api'
|
|
|
|
api.config.mappings.default_on_attach(bufnr)
|
2023-10-15 22:30:52 +08:00
|
|
|
|
2023-11-22 23:19:24 +08:00
|
|
|
-- override a default
|
2023-11-23 13:19:07 +08:00
|
|
|
G.map({
|
|
|
|
{'n', 'v', api.node.open.vertical, {buffer = bufnr}},
|
|
|
|
{'n', 's', api.node.open.horizontal, {buffer = bufnr}},
|
|
|
|
})
|
|
|
|
|
2023-11-22 23:19:24 +08:00
|
|
|
G.delmap({
|
|
|
|
{'n', '<C-e>', { buffer = bufnr }},
|
2023-11-23 13:19:07 +08:00
|
|
|
{'n', '<C-v>', { buffer = bufnr }},
|
|
|
|
{'n', '<C-x>', { buffer = bufnr }},
|
2023-11-22 23:19:24 +08:00
|
|
|
})
|
2023-11-15 12:56:11 +08:00
|
|
|
|
2023-11-22 23:19:24 +08:00
|
|
|
end
|
|
|
|
}
|
|
|
|
G.map({
|
|
|
|
{"n", "<C-e>", ":NvimTreeToggle<CR>", { noremap = true }},
|
|
|
|
})
|
|
|
|
end
|
2023-11-15 12:56:11 +08:00
|
|
|
}
|
2023-10-01 17:18:36 +08:00
|
|
|
}
|
2023-10-15 22:30:52 +08:00
|
|
|
|