From d92692309c41581e1f839033fbccd745be732c7e Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Wed, 22 Apr 2026 12:32:53 +0300 Subject: [PATCH 01/11] fix(refactoring)!: conform to upstream breaking changes on 2.0 branch (#7124) ## Description `refactoring.nvim` had a new 2.0 release with some breaking changes. Adjust the LazyVim Extra. Left `opts` with everything default as there've been changes there as well, but I don't use the plugin. ## Related Issue(s) Fixes #7122 ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- .../plugins/extras/editor/refactoring.lua | 114 ++++-------------- 1 file changed, 22 insertions(+), 92 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/refactoring.lua b/lua/lazyvim/plugins/extras/editor/refactoring.lua index 11ab3786..d1105d3b 100644 --- a/lua/lazyvim/plugins/extras/editor/refactoring.lua +++ b/lua/lazyvim/plugins/extras/editor/refactoring.lua @@ -1,95 +1,64 @@ -local pick = function() - local refactoring = require("refactoring") - if LazyVim.pick.picker.name == "telescope" then - return require("telescope").extensions.refactoring.refactors() - elseif LazyVim.pick.picker.name == "fzf" then - local fzf_lua = require("fzf-lua") - local results = refactoring.get_refactors() - - local opts = { - fzf_opts = {}, - fzf_colors = true, - actions = { - ["default"] = function(selected) - refactoring.refactor(selected[1]) - end, - }, - } - fzf_lua.fzf_exec(results, opts) - else - refactoring.select_refactor() +if LazyVim.has_extra("editor.refactoring") then + if vim.fn.has("nvim-0.12") == 0 then + LazyVim.error("refactoring.nvim requires Neovim 0.12 or higher", { title = "refactoring.nvim" }) + return {} end end return { + { "lewis6991/async.nvim", lazy = true }, + { "ThePrimeagen/refactoring.nvim", event = { "BufReadPre", "BufNewFile" }, - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-treesitter/nvim-treesitter", - }, keys = { { "r", "", desc = "+refactor", mode = { "n", "x" } }, { "rs", - pick, + function() + return require("refactoring").select_refactor() + end, mode = { "n", "x" }, - desc = "Refactor", + desc = "Select Refactor", }, { "ri", function() - return require("refactoring").refactor("Inline Variable") + return require("refactoring").inline_var() end, mode = { "n", "x" }, desc = "Inline Variable", expr = true, }, - { - "rb", - function() - return require("refactoring").refactor("Extract Block") - end, - mode = { "n", "x" }, - desc = "Extract Block", - expr = true, - }, - { - "rf", - function() - return require("refactoring").refactor("Extract Block To File") - end, - mode = { "n", "x" }, - desc = "Extract Block To File", - expr = true, - }, { "rP", function() - require("refactoring").debug.printf({ below = false }) + return require("refactoring.debug").print_loc({ output_location = "below" }) end, - desc = "Debug Print", + desc = "Debug Print Location", + expr = true, }, { "rp", function() - require("refactoring").debug.print_var({ normal = true }) + return require("refactoring.debug").print_var({ output_location = "below" }) .. "iw" end, mode = { "n", "x" }, desc = "Debug Print Variable", + expr = true, }, { "rc", function() - require("refactoring").debug.cleanup({}) + return require("refactoring.debug").cleanup({ restore_view = true }) .. "ag" end, desc = "Debug Cleanup", + expr = true, }, { "rf", function() - return require("refactoring").refactor("Extract Function") + return require("refactoring").extract_func() end, mode = { "n", "x" }, desc = "Extract Function", @@ -98,7 +67,7 @@ return { { "rF", function() - return require("refactoring").refactor("Extract Function To File") + return require("refactoring").extract_func_to_file() end, mode = { "n", "x" }, desc = "Extract Function To File", @@ -107,52 +76,13 @@ return { { "rx", function() - return require("refactoring").refactor("Extract Variable") + return require("refactoring").extract_var() end, mode = { "n", "x" }, desc = "Extract Variable", expr = true, }, - { - "rp", - function() - require("refactoring").debug.print_var() - end, - mode = { "n", "x" }, - desc = "Debug Print Variable", - }, }, - opts = { - prompt_func_return_type = { - go = false, - java = false, - cpp = false, - c = false, - h = false, - hpp = false, - cxx = false, - }, - prompt_func_param_type = { - go = false, - java = false, - cpp = false, - c = false, - h = false, - hpp = false, - cxx = false, - }, - printf_statements = {}, - print_var_statements = {}, - show_success_message = true, -- shows a message with information about the refactor on success - -- i.e. [Refactor] Inlined 3 variable occurrences - }, - config = function(_, opts) - require("refactoring").setup(opts) - if LazyVim.has("telescope.nvim") then - LazyVim.on_load("telescope.nvim", function() - require("telescope").load_extension("refactoring") - end) - end - end, + opts = {}, }, } From cdc47ae6152872ad09d588697906bf93cba3fcd9 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Wed, 22 Apr 2026 09:33:58 +0000 Subject: [PATCH 02/11] chore(build): auto-generated vimdocs --- doc/LazyVim.txt | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 1288f75d..7802ea89 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,5 @@ *LazyVim.txt* LazyVim docs + For Neovim Last change: 2026 April 22 ============================================================================== Table of Contents *LazyVim-table-of-contents* @@ -78,22 +79,26 @@ Try it with Docker ~ Install the LazyVim Starter ~ - Make a backup of your current Neovim files: - >sh + +>sh mv ~/.config/nvim ~/.config/nvim.bak mv ~/.local/share/nvim ~/.local/share/nvim.bak - < +< - Clone the starter - >sh + +>sh git clone https://github.com/LazyVim/starter ~/.config/nvim - < +< - Remove the `.git` folder, so you can add it to your own repo later - >sh + +>sh rm -rf ~/.config/nvim/.git - < +< - Start Neovim! - >sh + +>sh nvim - < +< Refer to the comments in the files on how to customize **LazyVim**. ------------------------------------------------------------------------------ From d840410047d20a8f93fb8d473599209ebe95584e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 26 Apr 2026 20:15:56 +0200 Subject: [PATCH 03/11] fix(oxc): prefer top-level oxlint root_dir in monorepos --- lua/lazyvim/plugins/extras/lang/typescript/oxc.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/typescript/oxc.lua b/lua/lazyvim/plugins/extras/lang/typescript/oxc.lua index d4efb30c..c2f35843 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript/oxc.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript/oxc.lua @@ -30,6 +30,15 @@ return { servers = { ---@type lspconfig.settings.oxlint oxlint = { + root_dir = function(bufnr, on_dir) + -- prefer the top-level oxlint config if it exists (monorepo support) + local git = vim.fs.root(bufnr, ".git") + local markers = { ".oxlintrc.json", ".oxlintrc.jsonc", "oxlint.config.ts" } + local root = git and vim.fs.root(git, markers) or vim.fs.root(bufnr, markers) + if root then + on_dir(root) + end + end, settings = { fixKind = "all", }, From 7c1301b89563198d1b2a295e673f6a7205adc076 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sun, 26 Apr 2026 18:17:07 +0000 Subject: [PATCH 04/11] chore(build): auto-generated vimdocs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 7802ea89..37675cf5 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,5 +1,5 @@ *LazyVim.txt* LazyVim docs - For Neovim Last change: 2026 April 22 + For Neovim Last change: 2026 April 26 ============================================================================== Table of Contents *LazyVim-table-of-contents* From dc6240f4d56ae0d40cd0e673ca740dda50c4bf3b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 18 May 2026 12:32:49 +0200 Subject: [PATCH 05/11] fix(hipatterns): don't color #add (use it too often as a private function in TS) --- lua/lazyvim/plugins/extras/util/mini-hipatterns.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazyvim/plugins/extras/util/mini-hipatterns.lua b/lua/lazyvim/plugins/extras/util/mini-hipatterns.lua index b8fa4d1a..8916375f 100644 --- a/lua/lazyvim/plugins/extras/util/mini-hipatterns.lua +++ b/lua/lazyvim/plugins/extras/util/mini-hipatterns.lua @@ -39,6 +39,9 @@ M.plugin = { group = function(_, _, data) ---@type string local match = data.full_match + if match == "#add" then + return + end local r, g, b = match:sub(2, 2), match:sub(3, 3), match:sub(4, 4) local hex_color = "#" .. r .. r .. g .. g .. b .. b From 2dc527e511c2afeda10049311d44720cb46d80c1 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Mon, 18 May 2026 10:33:59 +0000 Subject: [PATCH 06/11] chore(build): auto-generated vimdocs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 37675cf5..6643c2ee 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,5 +1,5 @@ *LazyVim.txt* LazyVim docs - For Neovim Last change: 2026 April 26 + For Neovim Last change: 2026 May 18 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 58089db8b198fc81f91789b6f12d0617cae21437 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 20 May 2026 19:36:38 +0200 Subject: [PATCH 07/11] feat(keymaps): added leader+bi to delete invisible buffers --- lua/lazyvim/config/keymaps.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 9651e4e6..574e77e2 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -43,6 +43,9 @@ end, { desc = "Delete Buffer" }) map("n", "bo", function() Snacks.bufdelete.other() end, { desc = "Delete Other Buffers" }) +map("n", "bi", function() + Snacks.bufdelete.invisible() +end, { desc = "Delete Invisible Buffers" }) map("n", "bD", ":bd", { desc = "Delete Buffer and Window" }) -- Clear search and stop snippet on escape From fa88241e2f633feb530b09dc014fc51dcff5f5a8 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Wed, 20 May 2026 17:38:08 +0000 Subject: [PATCH 08/11] chore(build): auto-generated vimdocs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 6643c2ee..c6e641fb 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,5 +1,5 @@ *LazyVim.txt* LazyVim docs - For Neovim Last change: 2026 May 18 + For Neovim Last change: 2026 May 20 ============================================================================== Table of Contents *LazyVim-table-of-contents* From b830a523b5973c300639d4d9c4fea7d92fa04dc3 Mon Sep 17 00:00:00 2001 From: David Desmarais-Michaud Date: Tue, 26 May 2026 09:25:50 -0400 Subject: [PATCH 09/11] fix(go): use semanticTokens if setup in gopls config init_options (#7172) ## Description Since upgrading to the go lsp (gopls) to version 0.22.0 we receive the following error on load of any Go file: ``` ...nvim/lazy/LazyVim/lua/lazyvim/plugins/extras/lang/go.lua:64: attempt to index local 'semantic' (a nil value) ``` This PR adds a check to avoid this error. If this causes degraded functionality, or a different fix around semantic tokens is needed, I do not know. ## Screenshots image ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/go.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/go.lua b/lua/lazyvim/plugins/extras/lang/go.lua index 7098a055..2eff8be3 100644 --- a/lua/lazyvim/plugins/extras/lang/go.lua +++ b/lua/lazyvim/plugins/extras/lang/go.lua @@ -14,6 +14,9 @@ return { opts = { servers = { gopls = { + init_options = { + semanticTokens = true, + }, settings = { gopls = { gofumpt = true, @@ -46,7 +49,6 @@ return { completeUnimported = true, staticcheck = true, directoryFilters = { "-.git", "-.vscode", "-.idea", "-.vscode-test", "-node_modules" }, - semanticTokens = true, }, }, }, @@ -56,7 +58,12 @@ return { -- workaround for gopls not supporting semanticTokensProvider -- https://github.com/golang/go/issues/54531#issuecomment-1464982242 Snacks.util.lsp.on({ name = "gopls" }, function(_, client) - if not client.server_capabilities.semanticTokensProvider then + if + client.config + and client.config.init_options + and client.config.init_options.semanticTokens + and not client.server_capabilities.semanticTokensProvider + then local semantic = client.config.capabilities.textDocument.semanticTokens client.server_capabilities.semanticTokensProvider = { full = true, From c429ebb62825f60b0bcfc5d04ffb98ebeb3c0613 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Tue, 26 May 2026 13:26:59 +0000 Subject: [PATCH 10/11] chore(build): auto-generated vimdocs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index c6e641fb..b2271e94 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,5 +1,5 @@ *LazyVim.txt* LazyVim docs - For Neovim Last change: 2026 May 20 + For Neovim Last change: 2026 May 26 ============================================================================== Table of Contents *LazyVim-table-of-contents* From b30c0312ea1c5bed6b28e72d930059622b0525f8 Mon Sep 17 00:00:00 2001 From: Thomas Vandal Date: Tue, 26 May 2026 09:27:06 -0400 Subject: [PATCH 11/11] fix(autocmds): replace `vim.hl.on_yank` with `vim.hl.hl_op` for `nvim-0.13` and above (#7171) ## Description A recent PR (https://github.com/neovim/neovim/pull/39777) replaced `vim.hl.on_yank` with a more generic `vim.hl.hl_op` and deprecated the former. This PR simply checks for `nvim-0.13` support and uses the new interface if available. This removes a deprecation warning and will avoid an error when `on_yank` gets deprecated in the nvim 0.14 release. Thanks! ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/autocmds.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/config/autocmds.lua b/lua/lazyvim/config/autocmds.lua index a0b058a6..9e16022b 100644 --- a/lua/lazyvim/config/autocmds.lua +++ b/lua/lazyvim/config/autocmds.lua @@ -18,7 +18,11 @@ vim.api.nvim_create_autocmd({ "FocusGained", "TermClose", "TermLeave" }, { vim.api.nvim_create_autocmd("TextYankPost", { group = augroup("highlight_yank"), callback = function() - (vim.hl or vim.highlight).on_yank() + if vim.fn.has("nvim-0.13") then + vim.hl.hl_op() + else + (vim.hl or vim.highlight).on_yank() + end end, })