summaryrefslogtreecommitdiff
path: root/lua/lvim/core/nvimtree.lua
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2022-06-11 17:46:37 +0200
committerGitHub <[email protected]>2022-06-11 17:46:37 +0200
commit1d1f7bac658f0c376cdd9e0df691fc4015be14b7 (patch)
treec880862805a9af3560348db920254f0063177b38 /lua/lvim/core/nvimtree.lua
parent59361ebe7b677dea0ca490b989af89c8918e1618 (diff)
fix: skip calling nvim-tree.setup() more than once (#2707)
Diffstat (limited to 'lua/lvim/core/nvimtree.lua')
-rw-r--r--lua/lvim/core/nvimtree.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/lua/lvim/core/nvimtree.lua b/lua/lvim/core/nvimtree.lua
index 7f50f256..711ddc52 100644
--- a/lua/lvim/core/nvimtree.lua
+++ b/lua/lvim/core/nvimtree.lua
@@ -158,10 +158,13 @@ function M.setup()
return
end
- for opt, val in pairs(lvim.builtin.nvimtree) do
- vim.g["nvim_tree_" .. opt] = val
+ if lvim.builtin.nvimtree._setup_called then
+ Log:debug "ignoring repeated setup call for nvim-tree, see kyazdani42/nvim-tree.lua#1308"
+ return
end
+ lvim.builtin.nvimtree._setup_called = true
+
-- Implicitly update nvim-tree when project module is active
if lvim.builtin.project.active then
lvim.builtin.nvimtree.setup.respect_buf_cwd = true