diff options
Diffstat (limited to 'lua/lvim/core/nvimtree.lua')
-rw-r--r-- | lua/lvim/core/nvimtree.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lua/lvim/core/nvimtree.lua b/lua/lvim/core/nvimtree.lua index 7f50f256..9d7ab069 100644 --- a/lua/lvim/core/nvimtree.lua +++ b/lua/lvim/core/nvimtree.lua @@ -148,7 +148,6 @@ function M.config() }, }, } - lvim.builtin.which_key.mappings["e"] = { "<cmd>NvimTreeToggle<CR>", "Explorer" } end function M.setup() @@ -158,10 +157,14 @@ 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.which_key.mappings["e"] = { "<cmd>NvimTreeToggle<CR>", "Explorer" } + 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 |