summaryrefslogtreecommitdiff
path: root/lua/core/nvimtree.lua
diff options
context:
space:
mode:
authorAhmed Khalf <[email protected]>2021-08-18 09:34:26 +0400
committerGitHub <[email protected]>2021-08-18 01:34:26 -0400
commitb9b9c69615b469146e3cc75adcf9bd61047404eb (patch)
treee6b3ea906e1c1d2c6710deec6e16ae5f01799713 /lua/core/nvimtree.lua
parent21b621c95af592d0da46a29fe4dcc02e5d16c6eb (diff)
[Refactor]: Remove vim-rooter and smart-cwd; then use project.nvim (#1315)
* Replace vim-rooter with project.nvim * Implement stylua format * Remove smart_cwd * Implicitly update nvim-tree dir when project active * Link datapath to cache * Fix stylua * Fix lint * Fix telescope bug * Fix telescope dependency * Fix telescope once and for all * Fix telescope once again
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