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: [PATCH] fix: skip calling nvim-tree.setup() more than once (#2707) --- .gitignore | 2 ++ lua/lvim/core/nvimtree.lua | 7 +++++-- lua/lvim/lsp/config.lua | 1 + snapshots/default.json | 34 +++++++++++++++++----------------- 4 files changed, 25 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index a9396a17..440d01d9 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,5 @@ lua/lv-user-config/ *.bak *.backup *.old + +.luacheckcache \ No newline at end of file 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 diff --git a/lua/lvim/lsp/config.lua b/lua/lvim/lsp/config.lua index a0e22107..1f84c4e2 100644 --- a/lua/lvim/lsp/config.lua +++ b/lua/lvim/lsp/config.lua @@ -32,6 +32,7 @@ local skipped_servers = { "stylelint_lsp", "tailwindcss", "tflint", + "svlangserver", "verible", "vuels", } diff --git a/snapshots/default.json b/snapshots/default.json index de28eeaf..baae2023 100644 --- a/snapshots/default.json +++ b/snapshots/default.json @@ -1,6 +1,6 @@ { "Comment.nvim": { - "commit": "bdf9ca6" + "commit": "3c69bab" }, "FixCursorHold.nvim": { "commit": "1bfb32e" @@ -30,10 +30,10 @@ "commit": "bbda2b0" }, "friendly-snippets": { - "commit": "974d792" + "commit": "d27a83a" }, "gitsigns.nvim": { - "commit": "27aeb2e" + "commit": "c18e016" }, "lua-dev.nvim": { "commit": "54149d1" @@ -42,34 +42,34 @@ "commit": "3362b28" }, "nlsp-settings.nvim": { - "commit": "f27faa4" + "commit": "931b6ff" }, "null-ls.nvim": { - "commit": "474372a" + "commit": "dfdd5fa" }, "nvim-autopairs": { - "commit": "b9cc0a2" + "commit": "84cde35" }, "nvim-cmp": { - "commit": "033a817" + "commit": "15c7bf7" }, "nvim-dap": { - "commit": "688cb52" + "commit": "014ebd5" }, "nvim-lsp-installer": { - "commit": "ce70a78" + "commit": "effafae" }, "nvim-lspconfig": { - "commit": "eb03999" + "commit": "4eac16e" }, "nvim-notify": { - "commit": "8252aae" + "commit": "8960269" }, "nvim-tree.lua": { - "commit": "1caca62" + "commit": "bdb6d4a" }, "nvim-treesitter": { - "commit": "178f24e" + "commit": "9e8df1b" }, "nvim-ts-context-commentstring": { "commit": "8834375" @@ -84,7 +84,7 @@ "commit": "00ec5ad" }, "plenary.nvim": { - "commit": "54b2e3d" + "commit": "9c3239b" }, "popup.nvim": { "commit": "b7404d3" @@ -93,19 +93,19 @@ "commit": "541115e" }, "schemastore.nvim": { - "commit": "3a15757" + "commit": "442b79a" }, "structlog.nvim": { "commit": "232a8e2" }, "telescope-fzf-native.nvim": { - "commit": "f0dba7d" + "commit": "6a33ece" }, "telescope.nvim": { "commit": "e6b69b1" }, "toggleterm.nvim": { - "commit": "5bf839a" + "commit": "50f88d3" }, "which-key.nvim": { "commit": "f03a259"