2023-02-09 21:22:26 -08:00
|
|
|
local installed, nvim_tree = pcall(require, "nvim-tree")
|
2023-02-05 19:08:26 -08:00
|
|
|
if installed then
|
2023-02-09 21:22:26 -08:00
|
|
|
vim.g.loaded_netrw = 1
|
|
|
|
vim.g.loaded_netrwPlugin = 1
|
|
|
|
nvim_tree.setup({
|
|
|
|
sort_by = "case_sensitive",
|
|
|
|
disable_netrw = true,
|
|
|
|
view = {
|
|
|
|
adaptive_size = true,
|
|
|
|
mappings = {
|
|
|
|
list = {
|
|
|
|
{ key = "u", action = "dir_up" },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
renderer = {
|
|
|
|
highlight_git = true,
|
|
|
|
group_empty = true,
|
|
|
|
},
|
|
|
|
filters = {
|
|
|
|
dotfiles = false,
|
|
|
|
},
|
|
|
|
})
|
2023-02-05 19:08:26 -08:00
|
|
|
|
2023-02-09 21:22:26 -08:00
|
|
|
vim.api.nvim_set_keymap(
|
|
|
|
"n",
|
|
|
|
"<leader>m",
|
|
|
|
[[<cmd>lua require('nvim-tree').toggle()<cr>]],
|
|
|
|
{ noremap = true, silent = true }
|
|
|
|
)
|
2023-02-05 19:08:26 -08:00
|
|
|
end
|