diff --git a/lua/nvim-tree.lua b/lua/nvim-tree.lua index 09b5bacd90d..7bf6891c131 100644 --- a/lua/nvim-tree.lua +++ b/lua/nvim-tree.lua @@ -190,7 +190,7 @@ local function setup_autocommands(opts) end if opts.hijack_directories.enable then - create_nvim_tree_autocmd({ "BufEnter", "BufNewFile" }, { callback = M.open_on_directory }) + create_nvim_tree_autocmd({ "BufEnter", "BufNewFile" }, { callback = M.open_on_directory, nested = true }) end if opts.view.centralize_selection then