diff --git a/nvim/lua/filemanager.lua b/nvim/lua/filemanager.lua index 7dac607..b3e4045 100644 --- a/nvim/lua/filemanager.lua +++ b/nvim/lua/filemanager.lua @@ -23,11 +23,10 @@ vim.g.nvim_tree_icons = { -- extra options -vim.g.nvim_tree_indent_markers = 1 -vim.g.nvim_tree_add_trailing = 1 -vim.g.nvim_tree_special_files = { - ['README.md'] = true, - ['readme.md'] = true, +vim.g.nvim_tree_add_trailing=1 +vim.g.nvim_tree_special_files= { + ["README.md"] = true, + ["readme.md"] = true, Pipfile = true, Makefile = true, ['package.json'] = true, @@ -49,8 +48,15 @@ vim.cmd [[hi NvimTreeOpenedFolderName guifg=#D1D5DB ]] vim.cmd [[hi NvimTreeEmptyFolderName guifg=#D1D5DB ]] -- setup -require'nvim-tree'.setup { - update_cwd = true, +local nvimtree = require'nvim-tree' + +nvimtree.setup { + update_cwd = true, + renderer = { + indent_markers = { + enable = true, + }, + }, update_to_buf_dir = { enable = true, auto_open = true, @@ -78,3 +84,6 @@ require'nvim-tree'.setup { } vim.cmd("autocmd BufEnter * ++nested if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif") + +-- KEYMAPS +vim.keymap.set('n', 'e', nvimtree.toggle) diff --git a/nvim/lua/mappings.lua b/nvim/lua/mappings.lua index 3bd8801..acc83fa 100644 --- a/nvim/lua/mappings.lua +++ b/nvim/lua/mappings.lua @@ -18,9 +18,6 @@ vim.keymap.set('i', '[,', '[],O') -- toggle hybrid mode vim.keymap.set('n', 'h', ':set rnu!') --- nvim-tree.lua -vim.keymap.set('n', 'e', ':NvimTreeToggle') - -- Telescope vim.keymap.set('n', '', 'Telescope buffers') vim.keymap.set('n', 'f', 'Telescope find_files')