From 1d1f7bac658f0c376cdd9e0df691fc4015be14b7 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Sat, 11 Jun 2022 17:46:37 +0200 Subject: fix: skip calling nvim-tree.setup() more than once (#2707) --- lua/lvim/core/nvimtree.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lua/lvim/core/nvimtree.lua') 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 -- cgit v1.2.3 From 0ee8b8f65313d33b1ea4f406b2c4e772b0fe4895 Mon Sep 17 00:00:00 2001 From: Abouzar Parvan Date: Thu, 23 Jun 2022 10:27:18 +0430 Subject: feat: fix a couple of issues (#2750) * fix(nvimtree): do not set key if disabled * fix(telescope): move pickers of out defaults * fix(install): use proper gentoo installation --- lua/lvim/core/nvimtree.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/lvim/core/nvimtree.lua') diff --git a/lua/lvim/core/nvimtree.lua b/lua/lvim/core/nvimtree.lua index 711ddc52..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"] = { "NvimTreeToggle", "Explorer" } end function M.setup() @@ -163,6 +162,7 @@ function M.setup() return end + lvim.builtin.which_key.mappings["e"] = { "NvimTreeToggle", "Explorer" } lvim.builtin.nvimtree._setup_called = true -- Implicitly update nvim-tree when project module is active -- cgit v1.2.3