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 +++++-- lua/lvim/lsp/config.lua | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'lua/lvim') 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", } -- cgit v1.2.3 From 5d964c58848dde02bf04ce67bffe2398d2bbf1a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Rodr=C3=ADguez=20Rivero?= Date: Sun, 12 Jun 2022 10:09:41 +0200 Subject: feat(which-key): added search command for colour highlights (#2693) * feat(which-key): added search command for colour highlights * chore: review suggestion Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com> Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com> --- lua/lvim/core/which-key.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'lua/lvim') diff --git a/lua/lvim/core/which-key.lua b/lua/lvim/core/which-key.lua index b1ae6f87..3015781b 100644 --- a/lua/lvim/core/which-key.lua +++ b/lua/lvim/core/which-key.lua @@ -244,6 +244,7 @@ M.config = function() c = { "Telescope colorscheme", "Colorscheme" }, f = { "Telescope find_files", "Find File" }, h = { "Telescope help_tags", "Find Help" }, + H = { "Telescope highlights", "Find highlight groups" }, M = { "Telescope man_pages", "Man Pages" }, r = { "Telescope oldfiles", "Open Recent File" }, R = { "Telescope registers", "Registers" }, -- 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 +- lua/lvim/core/telescope.lua | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'lua/lvim') 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 diff --git a/lua/lvim/core/telescope.lua b/lua/lvim/core/telescope.lua index 6a04a866..f556913b 100644 --- a/lua/lvim/core/telescope.lua +++ b/lua/lvim/core/telescope.lua @@ -70,14 +70,14 @@ function M.config() borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, color_devicons = true, set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, - pickers = { - find_files = { - hidden = true, - }, - live_grep = { - --@usage don't include the filename in the search results - only_sort_text = true, - }, + }, + pickers = { + find_files = { + hidden = true, + }, + live_grep = { + --@usage don't include the filename in the search results + only_sort_text = true, }, }, extensions = { -- cgit v1.2.3 From 16c0c862840b113374ed80e5e2ce56b59e03b298 Mon Sep 17 00:00:00 2001 From: CPea <42694704+cpea2506@users.noreply.github.com> Date: Thu, 23 Jun 2022 12:59:30 +0700 Subject: chore(lsp): notify format request failed once when there is no client (#2697) --- lua/lvim/lsp/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/lvim') diff --git a/lua/lvim/lsp/utils.lua b/lua/lvim/lsp/utils.lua index 252e611c..d0e36241 100644 --- a/lua/lvim/lsp/utils.lua +++ b/lua/lvim/lsp/utils.lua @@ -176,7 +176,7 @@ function M.format(opts) end, clients) if #clients == 0 then - vim.notify "[LSP] Format request failed, no matching language servers." + vim.notify_once "[LSP] Format request failed, no matching language servers." end local timeout_ms = opts.timeout_ms or 1000 -- cgit v1.2.3 From ecd344128734fe6b0772505e22922dea28338e26 Mon Sep 17 00:00:00 2001 From: Myles Mo <54089360+emxxjnm@users.noreply.github.com> Date: Thu, 23 Jun 2022 14:02:15 +0800 Subject: fix(lualine): unique buf client names (#2683) Co-authored-by: emxxjnm --- lua/lvim/core/lualine/components.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lua/lvim') diff --git a/lua/lvim/core/lualine/components.lua b/lua/lvim/core/lualine/components.lua index b89bbd36..49a8ff81 100644 --- a/lua/lvim/core/lualine/components.lua +++ b/lua/lvim/core/lualine/components.lua @@ -110,7 +110,8 @@ return { local supported_linters = linters.list_registered(buf_ft) vim.list_extend(buf_client_names, supported_linters) - return "[" .. table.concat(buf_client_names, ", ") .. "]" + local unique_client_names = vim.fn.uniq(buf_client_names) + return "[" .. table.concat(unique_client_names, ", ") .. "]" end, color = { gui = "bold" }, cond = conditions.hide_in_width, -- cgit v1.2.3 From 8989984b781367b2744c4857e73d8943311db241 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Thu, 23 Jun 2022 16:11:47 +0200 Subject: feat(installer): add verify-plugins hook (#2751) --- lua/lvim/plugins.lua | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'lua/lvim') diff --git a/lua/lvim/plugins.lua b/lua/lvim/plugins.lua index 9397318e..dd40b967 100644 --- a/lua/lvim/plugins.lua +++ b/lua/lvim/plugins.lua @@ -246,9 +246,19 @@ local core_plugins = { }, } -for _, entry in ipairs(core_plugins) do - if not os.getenv "LVIM_DEV_MODE" then - entry["lock"] = true +local default_snapshot_path = join_paths(get_lvim_base_dir(), "snapshots", "default.json") +local content = vim.fn.readfile(default_snapshot_path) +local default_sha1 = vim.fn.json_decode(content) + +local get_default_sha1 = function(spec) + local short_name, _ = require("packer.util").get_plugin_short_name(spec) + return default_sha1[short_name] and default_sha1[short_name].commit +end + +for _, spec in ipairs(core_plugins) do + if not vim.env.LVIM_DEV_MODE then + -- Manually lock the commit hash since Packer's snapshots are unreliable in headless mode + spec["commit"] = get_default_sha1(spec) end end -- cgit v1.2.3