summaryrefslogtreecommitdiff
path: root/lua/core/nvimtree.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/core/nvimtree.lua')
-rw-r--r--lua/core/nvimtree.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/lua/core/nvimtree.lua b/lua/core/nvimtree.lua
index 7c99a91e..737f248e 100644
--- a/lua/core/nvimtree.lua
+++ b/lua/core/nvimtree.lua
@@ -60,6 +60,12 @@ M.setup = function()
g["nvim_tree_" .. opt] = val
end
+ -- Implicitly update nvim-tree when project module is active
+ if lvim.builtin.project.active then
+ vim.g.nvim_tree_update_cwd = 1
+ vim.g.nvim_tree_respect_buf_cwd = 1
+ end
+
local tree_cb = nvim_tree_config.nvim_tree_callback
if not g.nvim_tree_bindings then