2022-10-21 06:15:28 -04:00
|
|
|
local ok,nvim_tree = pcall(require,"nvim-tree")
|
|
|
|
if not ok then
|
|
|
|
vim.notify("Failed to load nvim-tree\n\n")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2023-01-04 07:28:57 -05:00
|
|
|
local keymap = vim.keymap.set
|
|
|
|
|
2023-01-03 14:13:09 -05:00
|
|
|
nvim_tree.setup({
|
|
|
|
sort_by = "case_sensitive",
|
2022-10-21 06:15:28 -04:00
|
|
|
view = {
|
2023-01-03 14:13:09 -05:00
|
|
|
adaptive_size = true,
|
2022-10-21 06:15:28 -04:00
|
|
|
mappings = {
|
2023-01-03 14:13:09 -05:00
|
|
|
list = {{ key = "u", action = "dir_up" }},
|
2022-10-21 06:15:28 -04:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
filters = {
|
|
|
|
dotfiles = true,
|
|
|
|
},
|
2023-01-03 14:13:09 -05:00
|
|
|
})
|
2023-01-04 07:28:57 -05:00
|
|
|
|
|
|
|
keymap("n","<C-n>",":NvimTreeToggle<CR>")
|
|
|
|
keymap("n","<leader>n",":NvimTreeFindFile<CR>")
|
|
|
|
keymap("n","<C-]>","gh defx#do_action('cd',getcwd())<CR>")
|