summaryrefslogtreecommitdiff
path: root/lua/core/nvimtree.lua
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2021-08-03 18:10:54 +0200
committerGitHub <[email protected]>2021-08-03 12:10:54 -0400
commit4c3c3f388557a182794bffdbf923129c66af885a (patch)
tree4138b428ccfbee42ffecdbc88bc7d2d42fa67195 /lua/core/nvimtree.lua
parentb608b08ff3a5f28e7c57bc7bd7a30cfe2ab5c111 (diff)
feat: add lvim.lsp.smart_cwd (#1218)
- Enable querying the language-server for the `root_dir` - Use `root_dir` to set the current working-directory (CWD) - Make vim-rooter configurable and add an option to disable it Inspired by "ahmedkhalf/lsp-rooter.nvim"
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 e29168e9..1a0de0b8 100644
--- a/lua/core/nvimtree.lua
+++ b/lua/core/nvimtree.lua
@@ -117,4 +117,10 @@ M.toggle_tree = function()
end
end
--
+function M.change_tree_dir(dir)
+ if vim.g.loaded_tree then
+ require("nvim-tree.lib").change_dir(dir)
+ end
+end
+--
return M