@@ -139,7 +139,7 @@ local plugins = {
139139 -- Renderer settings for minimal UI
140140 renderer = {
141141 add_trailing = false ,
142- group_empty = true ,
142+ group_empty = false , -- Show all directories, don't group empty ones
143143 highlight_git = true ,
144144 full_name = false ,
145145 highlight_opened_files = " none" ,
@@ -189,19 +189,19 @@ local plugins = {
189189 },
190190 },
191191
192- -- Hide dotfiles but show git files
192+ -- Show all files including dotfiles
193193 filters = {
194- dotfiles = false ,
195- git_clean = false ,
196- no_buffer = false ,
197- custom = { " .DS_Store" , " node_modules " , " __pycache__ " , " .turbo " , },
198- exclude = {},
194+ dotfiles = false , -- Show dotfiles (.env, .gitignore, etc.)
195+ git_clean = false , -- Show git-ignored files
196+ no_buffer = false , -- Show all files regardless of buffer status
197+ custom = { " .DS_Store" }, -- Only hide system files
198+ exclude = {}, -- Don't exclude any patterns
199199 },
200200
201201 -- Git integration
202202 git = {
203203 enable = true ,
204- ignore = true ,
204+ ignore = false , -- Show git-ignored files (like .env, build files, etc.)
205205 show_on_dirs = true ,
206206 show_on_open_dirs = true ,
207207 timeout = 400 ,
@@ -212,9 +212,10 @@ local plugins = {
212212 enable = false , -- Disable to prevent sign conflicts
213213 },
214214
215- -- Disable update_focused_file to reduce autocmd overhead
215+ -- Enable file sync to keep tree updated with current buffer
216216 update_focused_file = {
217- enable = false ,
217+ enable = true ,
218+ update_root = false , -- Don't change root when following files
218219 },
219220
220221 -- Actions
@@ -327,6 +328,16 @@ local plugins = {
327328 end ,
328329 })
329330
331+ -- Auto-refresh nvim-tree when files change
332+ vim .api .nvim_create_autocmd ({ " BufWritePost" , " FileChangedShellPost" }, {
333+ callback = function ()
334+ local api = require (" nvim-tree.api" )
335+ if api .tree .is_visible () then
336+ api .tree .reload ()
337+ end
338+ end ,
339+ })
340+
330341 -- Fix nvim-tree sign issues by ensuring all signs are properly defined
331342 vim .api .nvim_create_autocmd (" VimEnter" , {
332343 callback = function ()
@@ -652,6 +663,8 @@ keymap("n", "<leader>:", "<cmd>Telescope commands<cr>", { desc = "Commands" })
652663
653664-- File explorer
654665keymap (" n" , " <leader>e" , " <cmd>NvimTreeToggle<cr>" , { desc = " Toggle file explorer" })
666+ keymap (" n" , " <leader>E" , " <cmd>NvimTreeFindFile<cr>" , { desc = " Find current file in explorer" })
667+ keymap (" n" , " <leader>r" , " <cmd>NvimTreeRefresh<cr>" , { desc = " Refresh file explorer" })
655668
656669-- Buffer management
657670keymap (" n" , " <leader>w" , " <cmd>w<cr>" , { desc = " Save file" })
0 commit comments