From 55e9944e2b1e152b5acdc9cc015978a905fc2966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Baptiste=20GAZ=C3=89?= Date: Mon, 15 Sep 2025 07:15:34 +0200 Subject: [PATCH 001/103] fix(extras.ai.copilot): update status retrieval for lualine (#5900) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Following copilot.lua refactoring in https://github.com/zbirenbaum/copilot.lua/pull/431, lualine is unable to refresh. We face the following error ```  Error 15:55:22 msg_show.lua_error Error executing vim.schedule lua callback: ...share/nvim/lazy/lualine.nvim/lua/lualine/utils/utils.lua:211: lualine: Failed to refresh statusline: .../.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:415: Error executing lua: ...m/lazy/LazyVim/lua/lazyvim/plugins/extras/ai/copilot.lua:54: attempt to index field 'status' (a nil value) stack traceback: ...m/lazy/LazyVim/lua/lazyvim/plugins/extras/ai/copilot.lua:54: in function 'status' ...cal/share/nvim/lazy/LazyVim/lua/lazyvim/util/lualine.lua:17: in function 'cond' ...l/share/nvim/lazy/lualine.nvim/lua/lualine/component.lua:275: in function 'draw' ...are/nvim/lazy/lualine.nvim/lua/lualine/utils/section.lua:26: in function 'draw_section' .../.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:167: in function 'statusline' .../.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:309: in function <...gaze/.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:290> [C]: in function 'nvim_win_call' .../.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:415: in function 'refresh' .../.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:491: in function <.../.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:490> [C]: in function 'pcall' ...share/nvim/lazy/lualine.nvim/lua/lualine/utils/utils.lua:214: in function '' vim/_editor.lua: in function ``` ## Related Issue(s) #5899 ## Screenshots ![Screenshot 2025-04-05 at 16 16 56](https://github.com/user-attachments/assets/3dc28dc6-1622-41ef-9e70-380a37064da4) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ai/copilot.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index 4f1d54f2..deebcd7d 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -51,7 +51,7 @@ return { LazyVim.lualine.status(LazyVim.config.icons.kinds.Copilot, function() local clients = package.loaded["copilot"] and LazyVim.lsp.get_clients({ name = "copilot", bufnr = 0 }) or {} if #clients > 0 then - local status = require("copilot.api").status.data.status + local status = require("copilot.status").data.status return (status == "InProgress" and "pending") or (status == "Warning" and "error") or "ok" end end) From b68e478d2319adf32f72ddaa2a921ae5825790d4 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Mon, 15 Sep 2025 05:16:35 +0000 Subject: [PATCH 002/103] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 0e41c7bf..58aa462d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 May 12 +*LazyVim.txt* For Neovim Last change: 2025 September 15 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 1a729e2d4c4162501fe13224d669a654849deb36 Mon Sep 17 00:00:00 2001 From: Jorge Villalobos Date: Mon, 15 Sep 2025 01:16:52 -0400 Subject: [PATCH 003/103] fix(blink): use .get method to access presets (#6183) ## Description Latest version of blink.cmp renamed the keymap.presets table which breaks LazyVim's access to presets. This fixes it by using the `presets.get()` method instead, which internally resolves to the correct table and looks like the right API. ## Related Issue(s) N/A ## Screenshots N/A ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 10b2ee62..fe45b86b 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -109,7 +109,7 @@ return { if not opts.keymap[""] then if opts.keymap.preset == "super-tab" then -- super-tab opts.keymap[""] = { - require("blink.cmp.keymap.presets")["super-tab"][""][1], + require("blink.cmp.keymap.presets").get("super-tab")[""][1], LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), "fallback", } From 10e5bf5c5b5fb4da0afbb2d4d2b75595502c9690 Mon Sep 17 00:00:00 2001 From: Rabin Adhikari Date: Mon, 15 Sep 2025 07:18:00 +0200 Subject: [PATCH 004/103] fix(lang.python): enable venv-selector even when telescope is not available (#5829) ## Description Enable the `venv-selector` plugin even when the telescope plugin is not available. Now the `venv-selector` plugin supports `fzf-lua` and native selection, and by default, it chooses the previous, if available. More on this PR: https://github.com/linux-cultist/venv-selector.nvim/pull/188 Edit: Use the main branch of the repo since it is now the most updated branch ## Related Issue(s) None ## Screenshots N/A ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/python.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/python.lua b/lua/lazyvim/plugins/extras/lang/python.lua index 4c098452..3298f6dd 100644 --- a/lua/lazyvim/plugins/extras/lang/python.lua +++ b/lua/lazyvim/plugins/extras/lang/python.lua @@ -114,11 +114,7 @@ return { { "linux-cultist/venv-selector.nvim", - branch = "regexp", -- Use this branch for the new version cmd = "VenvSelect", - enabled = function() - return LazyVim.has("telescope.nvim") - end, opts = { settings = { options = { @@ -126,7 +122,7 @@ return { }, }, }, - -- Call config for python files and load the cached venv automatically + -- Call config for Python files and load the cached venv automatically ft = "python", keys = { { "cv", ":VenvSelect", desc = "Select VirtualEnv", ft = "python" } }, }, From bed725a054ed3e8c8c56dce7e2100335e567cf01 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 07:44:00 +0200 Subject: [PATCH 005/103] fix(lsp): fixed deprecated warnings --- lua/lazyvim/plugins/lsp/keymaps.lua | 2 +- lua/lazyvim/util/lsp.lua | 41 ++++++++++++++++++++++++++--- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index 318ec911..748f5b29 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -54,7 +54,7 @@ function M.has(buffer, method) method = method:find("/") and method or "textDocument/" .. method local clients = LazyVim.lsp.get_clients({ bufnr = buffer }) for _, client in ipairs(clients) do - if client.supports_method(method) then + if client:supports_method(method) then return true end end diff --git a/lua/lazyvim/util/lsp.lua b/lua/lazyvim/util/lsp.lua index e868dcf0..51aa471a 100644 --- a/lua/lazyvim/util/lsp.lua +++ b/lua/lazyvim/util/lsp.lua @@ -1,16 +1,51 @@ ---@class lazyvim.util.lsp local M = {} ----@alias lsp.Client.filter {id?: number, bufnr?: number, name?: string, method?: string, filter?:fun(client: lsp.Client):boolean} +---@alias lsp.Client.filter {id?: number, bufnr?: number, name?: string, method?: string, filter?:fun(client: vim.lsp.Client):boolean} + +--- Neovim 0.11 uses a lua class for clients, while older versions use a table. +--- Wraps older style clients to be compatible with the new style. +---@param client vim.lsp.Client +---@return vim.lsp.Client +local function wrap(client) + local meta = getmetatable(client) + if meta and meta.request then + return client + end + ---@diagnostic disable-next-line: undefined-field + if client.wrapped then + return client + end + local methods = { "request", "supports_method", "cancel_request", "notify" } + -- old style + return setmetatable({ wrapped = true }, { + __index = function(_, k) + if k == "supports_method" then + -- supports_method doesn't support the bufnr argument + return function(_, method) + return client[k](method) + end + end + if vim.tbl_contains(methods, k) then + return function(_, ...) + return client[k](...) + end + end + return client[k] + end, + }) +end ---@param opts? lsp.Client.filter function M.get_clients(opts) local ret = {} ---@type vim.lsp.Client[] if vim.lsp.get_clients then ret = vim.lsp.get_clients(opts) + ret = vim.tbl_map(wrap, ret) else ---@diagnostic disable-next-line: deprecated ret = vim.lsp.get_active_clients(opts) + ret = vim.tbl_map(wrap, ret) if opts and opts.method then ---@param client vim.lsp.Client ret = vim.tbl_filter(function(client) @@ -29,7 +64,7 @@ function M.on_attach(on_attach, name) local buffer = args.buf ---@type number local client = vim.lsp.get_client_by_id(args.data.client_id) if client and (not name or client.name == name) then - return on_attach(client, buffer) + return on_attach(wrap(client), buffer) end end, }) @@ -75,7 +110,7 @@ function M._check_methods(client, buffer) for method, clients in pairs(M._supports_method) do clients[client] = clients[client] or {} if not clients[client][buffer] then - if client.supports_method and client.supports_method(method, { bufnr = buffer }) then + if client.supports_method and client:supports_method(method, { bufnr = buffer }) then clients[client][buffer] = true vim.api.nvim_exec_autocmds("User", { pattern = "LspSupportsMethod", From 53a2de1c8b928655b50a6ecbbe28f53e42b14f82 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 15 Sep 2025 10:55:48 +0200 Subject: [PATCH 006/103] chore(main): release 14.15.1 (#6420) :robot: I have created a release *beep* *boop* --- ## [14.15.1](https://github.com/LazyVim/LazyVim/compare/v14.15.0...v14.15.1) (2025-09-15) ### Bug Fixes * **blink:** use .get method to access presets ([#6183](https://github.com/LazyVim/LazyVim/issues/6183)) ([1a729e2](https://github.com/LazyVim/LazyVim/commit/1a729e2d4c4162501fe13224d669a654849deb36)) * **extras.ai.copilot:** update status retrieval for lualine ([#5900](https://github.com/LazyVim/LazyVim/issues/5900)) ([55e9944](https://github.com/LazyVim/LazyVim/commit/55e9944e2b1e152b5acdc9cc015978a905fc2966)) * **lang.python:** enable venv-selector even when telescope is not available ([#5829](https://github.com/LazyVim/LazyVim/issues/5829)) ([10e5bf5](https://github.com/LazyVim/LazyVim/commit/10e5bf5c5b5fb4da0afbb2d4d2b75595502c9690)) * **lsp:** fixed deprecated warnings ([bed725a](https://github.com/LazyVim/LazyVim/commit/bed725a054ed3e8c8c56dce7e2100335e567cf01)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 10 ++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 5f6e5685..d4bbf7f7 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.15.0" + ".": "14.15.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 873ac748..3e2be0c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [14.15.1](https://github.com/LazyVim/LazyVim/compare/v14.15.0...v14.15.1) (2025-09-15) + + +### Bug Fixes + +* **blink:** use .get method to access presets ([#6183](https://github.com/LazyVim/LazyVim/issues/6183)) ([1a729e2](https://github.com/LazyVim/LazyVim/commit/1a729e2d4c4162501fe13224d669a654849deb36)) +* **extras.ai.copilot:** update status retrieval for lualine ([#5900](https://github.com/LazyVim/LazyVim/issues/5900)) ([55e9944](https://github.com/LazyVim/LazyVim/commit/55e9944e2b1e152b5acdc9cc015978a905fc2966)) +* **lang.python:** enable venv-selector even when telescope is not available ([#5829](https://github.com/LazyVim/LazyVim/issues/5829)) ([10e5bf5](https://github.com/LazyVim/LazyVim/commit/10e5bf5c5b5fb4da0afbb2d4d2b75595502c9690)) +* **lsp:** fixed deprecated warnings ([bed725a](https://github.com/LazyVim/LazyVim/commit/bed725a054ed3e8c8c56dce7e2100335e567cf01)) + ## [14.15.0](https://github.com/LazyVim/LazyVim/compare/v14.14.0...v14.15.0) (2025-05-12) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 73c35f1f..d622dfdf 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.15.0" -- x-release-please-version +M.version = "14.15.1" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From e7ce65e1bb814f79ecb45bfeca934e997e0ee42c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 10:58:22 +0200 Subject: [PATCH 007/103] feat!: LazyVim now requires Neovim >= 0.11 See #6421 for more info --- lua/lazyvim/plugins/init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index c06fa9bc..a0faebcd 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -1,6 +1,7 @@ -if vim.fn.has("nvim-0.9.0") == 0 then +if vim.fn.has("nvim-0.11.0") == 0 then vim.api.nvim_echo({ - { "LazyVim requires Neovim >= 0.9.0\n", "ErrorMsg" }, + { "LazyVim requires Neovim >= 0.11.0\n", "ErrorMsg" }, + { "For more info, see: https://github.com/LazyVim/LazyVim/issues/6421\n", "Comment" }, { "Press any key to exit", "MoreMsg" }, }, true, {}) vim.fn.getchar() From 0e56786aa4772c427375a1bb86dc27baf08ded7b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 10:59:26 +0200 Subject: [PATCH 008/103] docs: update required Neovim version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4d379504..fd6a3fe0 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ to tweak your config as needed, along with the convenience of a pre-configured s ## ⚡️ Requirements -- Neovim >= **0.9.0** (needs to be built with **LuaJIT**) +- Neovim >= **0.11.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) - a [Nerd Font](https://www.nerdfonts.com/) **_(optional)_** - a **C** compiler for `nvim-treesitter`. See [here](https://github.com/nvim-treesitter/nvim-treesitter#requirements) From 80573196a1e526d6906dfa7d1af2fcf71317c731 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Mon, 15 Sep 2025 09:00:43 +0000 Subject: [PATCH 009/103] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 58aa462d..0b861808 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -53,7 +53,7 @@ FEATURES *LazyVim-features* REQUIREMENTS *LazyVim-requirements* -- Neovim >= **0.9.0** (needs to be built with **LuaJIT**) +- Neovim >= **0.11.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) - a Nerd Font **(optional)** - a **C** compiler for `nvim-treesitter`. See here From 3516ae736a333185f6f17b70af20b088d04cbbb6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 11:04:50 +0200 Subject: [PATCH 010/103] fix: remove 0.9 compat --- lua/lazyvim/plugins/compat/nvim-0_9.lua | 41 ------------------------- lua/lazyvim/plugins/xtras.lua | 8 ----- 2 files changed, 49 deletions(-) delete mode 100644 lua/lazyvim/plugins/compat/nvim-0_9.lua diff --git a/lua/lazyvim/plugins/compat/nvim-0_9.lua b/lua/lazyvim/plugins/compat/nvim-0_9.lua deleted file mode 100644 index 81514ef8..00000000 --- a/lua/lazyvim/plugins/compat/nvim-0_9.lua +++ /dev/null @@ -1,41 +0,0 @@ --- Compatibility with Neovim 0.9 -return { - -- Use LuaSnip instead of native snippets - { "garymjr/nvim-snippets", enabled = false }, - { import = "lazyvim.plugins.extras.coding.luasnip" }, - - -- Use nvim-cmp instead of blink.cmp - { import = "lazyvim.plugins.extras.coding.nvim-cmp" }, - - -- Use mini.comment instead of ts-comments - { "folke/ts-comments.nvim", enabled = false }, - { import = "lazyvim.plugins.extras.coding.mini-comment" }, - - -- Use neodev-types with lazydev - { "folke/neodev.nvim", config = function() end }, - { - "folke/lazydev.nvim", - opts = function(_, opts) - opts.library = opts.library or {} - table.insert(opts.library, { "neodev.nvim/types/stable" }) - end, - config = function(_, opts) - -- force lazydev to load on Neovim 0.9 - require("lazydev.config").have_0_10 = true - require("lazydev").setup(opts) - end, - }, - { - "neovim/nvim-lspconfig", - dependencies = {}, - }, - - -- dummy import to save core imports - { - import = "foobar", - enabled = function() - LazyVim.plugin.save_core() - return false - end, - }, -} diff --git a/lua/lazyvim/plugins/xtras.lua b/lua/lazyvim/plugins/xtras.lua index bb061d80..3f71b2aa 100644 --- a/lua/lazyvim/plugins/xtras.lua +++ b/lua/lazyvim/plugins/xtras.lua @@ -42,15 +42,7 @@ end ---@type string[] extras = LazyVim.dedup(extras) -local version = vim.version() -local v = version.major .. "_" .. version.minor - -local compat = { "0_9" } - LazyVim.plugin.save_core() -if vim.tbl_contains(compat, v) then - table.insert(extras, 1, "lazyvim.plugins.compat.nvim-" .. v) -end if vim.g.vscode then table.insert(extras, 1, "lazyvim.plugins.extras.vscode") end From a7a94c50ac1ae5e791ce88fab455d5c6edee385e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 11:16:51 +0200 Subject: [PATCH 011/103] refactor: remove all <0.11 compat code --- lua/lazyvim/config/init.lua | 2 +- lua/lazyvim/config/keymaps.lua | 10 --- lua/lazyvim/config/options.lua | 14 ++-- lua/lazyvim/health.lua | 9 +-- lua/lazyvim/plugins/extras/editor/navic.lua | 2 +- lua/lazyvim/plugins/extras/lang/ruby.lua | 4 -- lua/lazyvim/plugins/extras/lang/rust.lua | 1 - lua/lazyvim/plugins/extras/lang/svelte.lua | 5 -- .../plugins/extras/lang/typescript.lua | 4 +- lua/lazyvim/plugins/extras/lang/yaml.lua | 10 --- lua/lazyvim/plugins/lsp/init.lua | 64 ++++++++----------- lua/lazyvim/util/lsp.lua | 54 ++-------------- lua/lazyvim/util/ui.lua | 5 -- 13 files changed, 40 insertions(+), 144 deletions(-) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index d622dfdf..9e0903c2 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -353,7 +353,7 @@ function M.get_defaults() { name = "telescope", extra = "editor.telescope" }, }, cmp = { - { name = "blink.cmp", extra = "coding.blink", enabled = vim.fn.has("nvim-0.10") == 1 }, + { name = "blink.cmp", extra = "coding.blink" }, { name = "nvim-cmp", extra = "coding.nvim-cmp" }, }, explorer = { diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index fbc7f5d1..acaf44d9 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -209,13 +209,3 @@ map("n", "", "tabnew", { desc = "New Tab" }) map("n", "]", "tabnext", { desc = "Next Tab" }) map("n", "d", "tabclose", { desc = "Close Tab" }) map("n", "[", "tabprevious", { desc = "Previous Tab" }) - --- native snippets. only needed on < 0.11, as 0.11 creates these by default -if vim.fn.has("nvim-0.11") == 0 then - map("s", "", function() - return vim.snippet.active({ direction = 1 }) and "lua vim.snippet.jump(1)" or "" - end, { expr = true, desc = "Jump Next" }) - map({ "i", "s" }, "", function() - return vim.snippet.active({ direction = -1 }) and "lua vim.snippet.jump(-1)" or "" - end, { expr = true, desc = "Jump Previous" }) -end diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index 0bbaacba..b5d444d0 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -68,7 +68,10 @@ opt.fillchars = { diff = "╱", eob = " ", } +opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()" opt.foldlevel = 99 +opt.foldmethod = "expr" +opt.foldtext = "" opt.formatexpr = "v:lua.require'lazyvim.util'.format.formatexpr()" opt.formatoptions = "jcroqlnt" -- tcqj opt.grepformat = "%f:%l:%c:%m" @@ -95,6 +98,7 @@ opt.sidescrolloff = 8 -- Columns of context opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time opt.smartcase = true -- Don't ignore case with capitals opt.smartindent = true -- Insert indents automatically +opt.smoothscroll = true opt.spelllang = { "en" } opt.splitbelow = true -- Put new windows below current opt.splitkeep = "screen" @@ -111,15 +115,5 @@ opt.wildmode = "longest:full,full" -- Command-line completion mode opt.winminwidth = 5 -- Minimum window width opt.wrap = false -- Disable line wrap -if vim.fn.has("nvim-0.10") == 1 then - opt.smoothscroll = true - opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()" - opt.foldmethod = "expr" - opt.foldtext = "" -else - opt.foldmethod = "indent" - opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()" -end - -- Fix markdown indentation settings vim.g.markdown_recommended_style = 0 diff --git a/lua/lazyvim/health.lua b/lua/lazyvim/health.lua index 9fdc5a56..716c60a8 100644 --- a/lua/lazyvim/health.lua +++ b/lua/lazyvim/health.lua @@ -8,13 +8,10 @@ local error = vim.health.error or vim.health.report_error function M.check() start("LazyVim") - if vim.fn.has("nvim-0.9.0") == 1 then - ok("Using Neovim >= 0.9.0") - if vim.fn.has("nvim-0.10.0") == 0 then - warn("Use Neovim >= 0.10.0 for the best experience") - end + if vim.fn.has("nvim-0.11.0") == 1 then + ok("Using Neovim >= 0.11.0") else - error("Neovim >= 0.9.0 is required") + error("Neovim >= 0.11.0 is required") end for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit", "fzf", "curl" }) do diff --git a/lua/lazyvim/plugins/extras/editor/navic.lua b/lua/lazyvim/plugins/extras/editor/navic.lua index e25d1b51..91ec203c 100644 --- a/lua/lazyvim/plugins/extras/editor/navic.lua +++ b/lua/lazyvim/plugins/extras/editor/navic.lua @@ -8,7 +8,7 @@ return { init = function() vim.g.navic_silence = true LazyVim.lsp.on_attach(function(client, buffer) - if client.supports_method("textDocument/documentSymbol") then + if client:supports_method("textDocument/documentSymbol") then require("nvim-navic").attach(client, buffer) end end) diff --git a/lua/lazyvim/plugins/extras/lang/ruby.lua b/lua/lazyvim/plugins/extras/lang/ruby.lua index 4224e6d8..65620f4e 100644 --- a/lua/lazyvim/plugins/extras/lang/ruby.lua +++ b/lua/lazyvim/plugins/extras/lang/ruby.lua @@ -6,10 +6,6 @@ if lazyvim_docs then end local lsp = vim.g.lazyvim_ruby_lsp or "ruby_lsp" -if vim.fn.has("nvim-0.10") == 0 then - -- ruby_lsp does not work well with Neovim < 0.10 - lsp = vim.g.lazyvim_ruby_lsp or "solargraph" -end local formatter = vim.g.lazyvim_ruby_formatter or "rubocop" return { diff --git a/lua/lazyvim/plugins/extras/lang/rust.lua b/lua/lazyvim/plugins/extras/lang/rust.lua index 0adddf18..eca1b597 100644 --- a/lua/lazyvim/plugins/extras/lang/rust.lua +++ b/lua/lazyvim/plugins/extras/lang/rust.lua @@ -56,7 +56,6 @@ return { { "mrcjkb/rustaceanvim", - version = vim.fn.has("nvim-0.10.0") == 0 and "^4" or false, ft = { "rust" }, opts = { server = { diff --git a/lua/lazyvim/plugins/extras/lang/svelte.lua b/lua/lazyvim/plugins/extras/lang/svelte.lua index 565e50e5..4060e2f3 100644 --- a/lua/lazyvim/plugins/extras/lang/svelte.lua +++ b/lua/lazyvim/plugins/extras/lang/svelte.lua @@ -31,11 +31,6 @@ return { desc = "Organize Imports", }, }, - capabilities = { - workspace = { - didChangeWatchedFiles = vim.fn.has("nvim-0.10") == 0 and { dynamicRegistration = true }, - }, - }, }, }, }, diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index f7cc3231..f9132807 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -137,14 +137,14 @@ return { local action, uri, range = unpack(command.arguments) local function move(newf) - client.request("workspace/executeCommand", { + client:request("workspace/executeCommand", { command = command.command, arguments = { action, uri, range, newf }, }) end local fname = vim.uri_to_fname(uri) - client.request("workspace/executeCommand", { + client:request("workspace/executeCommand", { command = "typescript.tsserverRequest", arguments = { "getMoveToRefactoringFileSuggestions", diff --git a/lua/lazyvim/plugins/extras/lang/yaml.lua b/lua/lazyvim/plugins/extras/lang/yaml.lua index 9a3aadb8..b460f3c5 100644 --- a/lua/lazyvim/plugins/extras/lang/yaml.lua +++ b/lua/lazyvim/plugins/extras/lang/yaml.lua @@ -55,16 +55,6 @@ return { }, }, }, - setup = { - yamlls = function() - -- Neovim < 0.10 does not have dynamic registration for formatting - if vim.fn.has("nvim-0.10") == 0 then - LazyVim.lsp.on_attach(function(client, _) - client.server_capabilities.documentFormattingProvider = true - end, "yamlls") - end - end, - }, }, }, } diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index b5cba5f1..54f410fc 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -125,53 +125,39 @@ return { LazyVim.lsp.setup() LazyVim.lsp.on_dynamic_capability(require("lazyvim.plugins.lsp.keymaps").on_attach) - -- diagnostics signs - if vim.fn.has("nvim-0.10.0") == 0 then - if type(opts.diagnostics.signs) ~= "boolean" then - for severity, icon in pairs(opts.diagnostics.signs.text) do - local name = vim.diagnostic.severity[severity]:lower():gsub("^%l", string.upper) - name = "DiagnosticSign" .. name - vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" }) + -- inlay hints + if opts.inlay_hints.enabled then + LazyVim.lsp.on_supports_method("textDocument/inlayHint", function(client, buffer) + if + vim.api.nvim_buf_is_valid(buffer) + and vim.bo[buffer].buftype == "" + and not vim.tbl_contains(opts.inlay_hints.exclude, vim.bo[buffer].filetype) + then + vim.lsp.inlay_hint.enable(true, { bufnr = buffer }) end - end + end) end - if vim.fn.has("nvim-0.10") == 1 then - -- inlay hints - if opts.inlay_hints.enabled then - LazyVim.lsp.on_supports_method("textDocument/inlayHint", function(client, buffer) - if - vim.api.nvim_buf_is_valid(buffer) - and vim.bo[buffer].buftype == "" - and not vim.tbl_contains(opts.inlay_hints.exclude, vim.bo[buffer].filetype) - then - vim.lsp.inlay_hint.enable(true, { bufnr = buffer }) - end - end) - end - - -- code lens - if opts.codelens.enabled and vim.lsp.codelens then - LazyVim.lsp.on_supports_method("textDocument/codeLens", function(client, buffer) - vim.lsp.codelens.refresh() - vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "InsertLeave" }, { - buffer = buffer, - callback = vim.lsp.codelens.refresh, - }) - end) - end + -- code lens + if opts.codelens.enabled and vim.lsp.codelens then + LazyVim.lsp.on_supports_method("textDocument/codeLens", function(client, buffer) + vim.lsp.codelens.refresh() + vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "InsertLeave" }, { + buffer = buffer, + callback = vim.lsp.codelens.refresh, + }) + end) end if type(opts.diagnostics.virtual_text) == "table" and opts.diagnostics.virtual_text.prefix == "icons" then - opts.diagnostics.virtual_text.prefix = vim.fn.has("nvim-0.10.0") == 0 and "●" - or function(diagnostic) - local icons = LazyVim.config.icons.diagnostics - for d, icon in pairs(icons) do - if diagnostic.severity == vim.diagnostic.severity[d:upper()] then - return icon - end + opts.diagnostics.virtual_text.prefix = function(diagnostic) + local icons = LazyVim.config.icons.diagnostics + for d, icon in pairs(icons) do + if diagnostic.severity == vim.diagnostic.severity[d:upper()] then + return icon end end + end end vim.diagnostic.config(vim.deepcopy(opts.diagnostics)) diff --git a/lua/lazyvim/util/lsp.lua b/lua/lazyvim/util/lsp.lua index 51aa471a..02ab8b6e 100644 --- a/lua/lazyvim/util/lsp.lua +++ b/lua/lazyvim/util/lsp.lua @@ -3,56 +3,10 @@ local M = {} ---@alias lsp.Client.filter {id?: number, bufnr?: number, name?: string, method?: string, filter?:fun(client: vim.lsp.Client):boolean} ---- Neovim 0.11 uses a lua class for clients, while older versions use a table. ---- Wraps older style clients to be compatible with the new style. ----@param client vim.lsp.Client ----@return vim.lsp.Client -local function wrap(client) - local meta = getmetatable(client) - if meta and meta.request then - return client - end - ---@diagnostic disable-next-line: undefined-field - if client.wrapped then - return client - end - local methods = { "request", "supports_method", "cancel_request", "notify" } - -- old style - return setmetatable({ wrapped = true }, { - __index = function(_, k) - if k == "supports_method" then - -- supports_method doesn't support the bufnr argument - return function(_, method) - return client[k](method) - end - end - if vim.tbl_contains(methods, k) then - return function(_, ...) - return client[k](...) - end - end - return client[k] - end, - }) -end - ---@param opts? lsp.Client.filter function M.get_clients(opts) local ret = {} ---@type vim.lsp.Client[] - if vim.lsp.get_clients then - ret = vim.lsp.get_clients(opts) - ret = vim.tbl_map(wrap, ret) - else - ---@diagnostic disable-next-line: deprecated - ret = vim.lsp.get_active_clients(opts) - ret = vim.tbl_map(wrap, ret) - if opts and opts.method then - ---@param client vim.lsp.Client - ret = vim.tbl_filter(function(client) - return client.supports_method(opts.method, { bufnr = opts.bufnr }) - end, ret) - end - end + ret = vim.lsp.get_clients(opts) return opts and opts.filter and vim.tbl_filter(opts.filter, ret) or ret end @@ -64,7 +18,7 @@ function M.on_attach(on_attach, name) local buffer = args.buf ---@type number local client = vim.lsp.get_client_by_id(args.data.client_id) if client and (not name or client.name == name) then - return on_attach(wrap(client), buffer) + return on_attach(client, buffer) end end, }) @@ -204,8 +158,8 @@ function M.formatter(opts) local clients = M.get_clients(LazyVim.merge({}, filter, { bufnr = buf })) ---@param client vim.lsp.Client local ret = vim.tbl_filter(function(client) - return client.supports_method("textDocument/formatting") - or client.supports_method("textDocument/rangeFormatting") + return client:supports_method("textDocument/formatting") + or client:supports_method("textDocument/rangeFormatting") end, clients) ---@param client vim.lsp.Client return vim.tbl_map(function(client) diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/ui.lua index 3460b0ab..c8c899d5 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/ui.lua @@ -1,11 +1,6 @@ ---@class lazyvim.util.ui local M = {} --- foldtext for Neovim < 0.10.0 -function M.foldtext() - return vim.api.nvim_buf_get_lines(0, vim.v.lnum - 1, vim.v.lnum, false)[1] -end - -- optimized treesitter foldexpr for Neovim >= 0.10.0 function M.foldexpr() local buf = vim.api.nvim_get_current_buf() From 02d0c9aebddb902d9c974a38bb44db9bae4eac6d Mon Sep 17 00:00:00 2001 From: flippette Date: Mon, 15 Sep 2025 12:21:32 +0300 Subject: [PATCH 012/103] fix(catppuccin): follow renamed integration (#6354) ## Description [This commit](https://github.com/catppuccin/nvim/commit/30fa4d122d9b22ad8b2e0ab1b533c8c26c4dde86) renamed a Catppuccin integration; this PR follows the rename. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/colorscheme.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/colorscheme.lua b/lua/lazyvim/plugins/colorscheme.lua index fa611bf4..4c41d492 100644 --- a/lua/lazyvim/plugins/colorscheme.lua +++ b/lua/lazyvim/plugins/colorscheme.lua @@ -58,7 +58,7 @@ return { optional = true, opts = function(_, opts) if (vim.g.colors_name or ""):find("catppuccin") then - opts.highlights = require("catppuccin.groups.integrations.bufferline").get() + opts.highlights = require("catppuccin.groups.integrations.bufferline").get_theme() end end, }, From e2ba6bb51107cbd076b53b49ed7be99fc2fa3991 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 11:24:41 +0200 Subject: [PATCH 013/103] fix(harpoon): keymaps for 1-9. Fixes #6319 --- lua/lazyvim/plugins/extras/editor/harpoon2.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/harpoon2.lua b/lua/lazyvim/plugins/extras/editor/harpoon2.lua index 760d805a..699c2546 100644 --- a/lua/lazyvim/plugins/extras/editor/harpoon2.lua +++ b/lua/lazyvim/plugins/extras/editor/harpoon2.lua @@ -28,7 +28,7 @@ return { }, } - for i = 1, 5 do + for i = 1, 9 do table.insert(keys, { "" .. i, function() From 848dd3132af50f6d211d0c07166ea7c1a4259088 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Mon, 15 Sep 2025 12:27:29 +0300 Subject: [PATCH 014/103] fix(neo-tree): import neo-tree Extra before edgy Extra (#5763) ## Description Seems like since the move of `neo-tree` into Extras, its plugin spec is loaded after edgy's and that causes problems. Give `neo-tree` Extra higher prio than edgy Extra. ## Related Issue(s) Fixes #5762 ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/xtras.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/xtras.lua b/lua/lazyvim/plugins/xtras.lua index 3f71b2aa..19a5c6da 100644 --- a/lua/lazyvim/plugins/xtras.lua +++ b/lua/lazyvim/plugins/xtras.lua @@ -3,7 +3,8 @@ local prios = { ["lazyvim.plugins.extras.test.core"] = 1, ["lazyvim.plugins.extras.dap.core"] = 1, ["lazyvim.plugins.extras.coding.nvim-cmp"] = 2, - ["lazyvim.plugins.extras.ui.edgy"] = 2, + ["lazyvim.plugins.extras.editor.neo-tree"] = 2, + ["lazyvim.plugins.extras.ui.edgy"] = 3, ["lazyvim.plugins.extras.lang.typescript"] = 5, ["lazyvim.plugins.extras.coding.blink"] = 5, ["lazyvim.plugins.extras.formatting.prettier"] = 10, From ae3aaf2dd3a04eb5dbc5b1e34843558c85e45ac2 Mon Sep 17 00:00:00 2001 From: Sergey Kochetkov Date: Mon, 15 Sep 2025 11:45:00 +0200 Subject: [PATCH 015/103] fix(mini): update mini plugin references from echasnovski to nvim-mini (#6374) Updates all `mini.nvim` plugin references to use the new `nvim-mini` organization namespace instead of the legacy `echasnovski` namespace across all LazyVim configuration files. ## Description https://github.com/nvim-mini/mini.nvim/discussions/1970 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --------- Co-authored-by: Folke Lemaitre --- lua/lazyvim/plugins/coding.lua | 4 ++-- .../plugins/extras/coding/mini-comment.lua | 2 +- .../plugins/extras/coding/mini-snippets.lua | 6 +++--- .../plugins/extras/coding/mini-surround.lua | 2 +- lua/lazyvim/plugins/extras/editor/leap.lua | 2 +- lua/lazyvim/plugins/extras/editor/mini-diff.lua | 2 +- lua/lazyvim/plugins/extras/editor/mini-files.lua | 2 +- lua/lazyvim/plugins/extras/editor/mini-move.lua | 2 +- .../plugins/extras/editor/snacks_picker.lua | 2 +- lua/lazyvim/plugins/extras/lang/go.lua | 2 +- lua/lazyvim/plugins/extras/lang/typescript.lua | 2 +- lua/lazyvim/plugins/extras/ui/mini-animate.lua | 2 +- .../plugins/extras/ui/mini-indentscope.lua | 2 +- lua/lazyvim/plugins/extras/ui/mini-starter.lua | 4 ++-- lua/lazyvim/plugins/extras/ui/smear-cursor.lua | 2 +- lua/lazyvim/plugins/extras/util/chezmoi.lua | 2 +- .../plugins/extras/util/mini-hipatterns.lua | 2 +- lua/lazyvim/plugins/extras/util/project.lua | 2 +- lua/lazyvim/plugins/ui.lua | 2 +- lua/lazyvim/util/plugin.lua | 15 ++++++++++++--- tests/minit.lua | 2 +- 21 files changed, 36 insertions(+), 27 deletions(-) diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index 0e614e48..8b242eb8 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -1,7 +1,7 @@ return { -- auto pairs { - "echasnovski/mini.pairs", + "nvim-mini/mini.pairs", event = "VeryLazy", opts = { modes = { insert = true, command = true, terminal = false }, @@ -29,7 +29,7 @@ return { -- Better text-objects { - "echasnovski/mini.ai", + "nvim-mini/mini.ai", event = "VeryLazy", opts = function() local ai = require("mini.ai") diff --git a/lua/lazyvim/plugins/extras/coding/mini-comment.lua b/lua/lazyvim/plugins/extras/coding/mini-comment.lua index 457787ef..19113d67 100644 --- a/lua/lazyvim/plugins/extras/coding/mini-comment.lua +++ b/lua/lazyvim/plugins/extras/coding/mini-comment.lua @@ -1,6 +1,6 @@ return { { - "echasnovski/mini.comment", + "nvim-mini/mini.comment", event = "VeryLazy", opts = { options = { diff --git a/lua/lazyvim/plugins/extras/coding/mini-snippets.lua b/lua/lazyvim/plugins/extras/coding/mini-snippets.lua index d0a747a8..714d867d 100644 --- a/lua/lazyvim/plugins/extras/coding/mini-snippets.lua +++ b/lua/lazyvim/plugins/extras/coding/mini-snippets.lua @@ -4,14 +4,14 @@ if lazyvim_docs then vim.g.lazyvim_mini_snippets_in_completion = true -- NOTE: Please also read: - -- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-snippets.md#expand + -- https://github.com/nvim-mini/mini.nvim/blob/main/readmes/mini-snippets.md#expand -- :h MiniSnippets-session -- Example override for your own config: --[[ return { { - "echasnovski/mini.snippets", + "nvim-mini/mini.snippets", opts = function(_, opts) -- By default, for opts.snippets, the extra for mini.snippets only adds gen_loader.from_lang() -- This provides a sensible quickstart, integrating with friendly-snippets @@ -63,7 +63,7 @@ return { -- add mini.snippets desc = "Manage and expand snippets (alternative to Luasnip)", { - "echasnovski/mini.snippets", + "nvim-mini/mini.snippets", event = "InsertEnter", -- don't depend on other plugins to load... dependencies = "rafamadriz/friendly-snippets", opts = function() diff --git a/lua/lazyvim/plugins/extras/coding/mini-surround.lua b/lua/lazyvim/plugins/extras/coding/mini-surround.lua index d8ff25c5..19c5de8f 100644 --- a/lua/lazyvim/plugins/extras/coding/mini-surround.lua +++ b/lua/lazyvim/plugins/extras/coding/mini-surround.lua @@ -3,7 +3,7 @@ -- to select the text inside, change or modify the surrounding characters, -- and more. return { - "echasnovski/mini.surround", + "nvim-mini/mini.surround", keys = function(_, keys) -- Populate the keys based on the user's options local opts = LazyVim.opts("mini.surround") diff --git a/lua/lazyvim/plugins/extras/editor/leap.lua b/lua/lazyvim/plugins/extras/editor/leap.lua index 19c8b331..3fe4c5e7 100644 --- a/lua/lazyvim/plugins/extras/editor/leap.lua +++ b/lua/lazyvim/plugins/extras/editor/leap.lua @@ -37,7 +37,7 @@ return { -- rename surround mappings from gs to gz to prevent conflict with leap { - "echasnovski/mini.surround", + "nvim-mini/mini.surround", optional = true, opts = { mappings = { diff --git a/lua/lazyvim/plugins/extras/editor/mini-diff.lua b/lua/lazyvim/plugins/extras/editor/mini-diff.lua index fe25c11e..ea2e216d 100644 --- a/lua/lazyvim/plugins/extras/editor/mini-diff.lua +++ b/lua/lazyvim/plugins/extras/editor/mini-diff.lua @@ -7,7 +7,7 @@ return { -- setup mini.diff { - "echasnovski/mini.diff", + "nvim-mini/mini.diff", event = "VeryLazy", keys = { { diff --git a/lua/lazyvim/plugins/extras/editor/mini-files.lua b/lua/lazyvim/plugins/extras/editor/mini-files.lua index 70a42940..30cc14fc 100644 --- a/lua/lazyvim/plugins/extras/editor/mini-files.lua +++ b/lua/lazyvim/plugins/extras/editor/mini-files.lua @@ -1,5 +1,5 @@ return { - "echasnovski/mini.files", + "nvim-mini/mini.files", opts = { windows = { preview = true, diff --git a/lua/lazyvim/plugins/extras/editor/mini-move.lua b/lua/lazyvim/plugins/extras/editor/mini-move.lua index aa8823ef..26e977fd 100644 --- a/lua/lazyvim/plugins/extras/editor/mini-move.lua +++ b/lua/lazyvim/plugins/extras/editor/mini-move.lua @@ -1,6 +1,6 @@ return { { - "echasnovski/mini.move", + "nvim-mini/mini.move", event = "VeryLazy", opts = {}, }, diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 93f32fab..591da5ea 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -178,7 +178,7 @@ return { end, }, { - "echasnovski/mini.starter", + "nvim-mini/mini.starter", optional = true, opts = function(_, opts) local items = { diff --git a/lua/lazyvim/plugins/extras/lang/go.lua b/lua/lazyvim/plugins/extras/lang/go.lua index ff8def2e..77536fea 100644 --- a/lua/lazyvim/plugins/extras/lang/go.lua +++ b/lua/lazyvim/plugins/extras/lang/go.lua @@ -139,7 +139,7 @@ return { -- Filetype icons { - "echasnovski/mini.icons", + "nvim-mini/mini.icons", opts = { file = { [".go-version"] = { glyph = "", hl = "MiniIconsBlue" }, diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index f9132807..3830f795 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -263,7 +263,7 @@ return { -- Filetype icons { - "echasnovski/mini.icons", + "nvim-mini/mini.icons", opts = { file = { [".eslintrc.js"] = { glyph = "󰱺", hl = "MiniIconsYellow" }, diff --git a/lua/lazyvim/plugins/extras/ui/mini-animate.lua b/lua/lazyvim/plugins/extras/ui/mini-animate.lua index bbd3e587..5a3fdef6 100644 --- a/lua/lazyvim/plugins/extras/ui/mini-animate.lua +++ b/lua/lazyvim/plugins/extras/ui/mini-animate.lua @@ -10,7 +10,7 @@ return { -- setup animate { - "echasnovski/mini.animate", + "nvim-mini/mini.animate", event = "VeryLazy", cond = vim.g.neovide == nil, opts = function(_, opts) diff --git a/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua b/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua index 91ec1d45..ea266b24 100644 --- a/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua +++ b/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua @@ -3,7 +3,7 @@ return { -- code, this highlights the current level of indentation, and animates -- the highlighting. { - "echasnovski/mini.indentscope", + "nvim-mini/mini.indentscope", version = false, -- wait till new 0.7.0 release to put it back on semver event = "LazyFile", opts = { diff --git a/lua/lazyvim/plugins/extras/ui/mini-starter.lua b/lua/lazyvim/plugins/extras/ui/mini-starter.lua index c1bd7bc1..51444df5 100644 --- a/lua/lazyvim/plugins/extras/ui/mini-starter.lua +++ b/lua/lazyvim/plugins/extras/ui/mini-starter.lua @@ -5,7 +5,7 @@ return { -- enable mini.starter { - "echasnovski/mini.starter", + "nvim-mini/mini.starter", version = false, -- wait till new 0.7.0 release to put it back on semver event = "VimEnter", opts = function() @@ -67,7 +67,7 @@ return { local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) local pad_footer = string.rep(" ", 8) starter.config.footer = pad_footer .. "⚡ Neovim loaded " .. stats.count .. " plugins in " .. ms .. "ms" - -- INFO: based on @echasnovski's recommendation (thanks a lot!!!) + -- INFO: based on @nvim-mini's recommendation (thanks a lot!!!) if vim.bo[ev.buf].filetype == "ministarter" then pcall(starter.refresh) end diff --git a/lua/lazyvim/plugins/extras/ui/smear-cursor.lua b/lua/lazyvim/plugins/extras/ui/smear-cursor.lua index 070d2623..2ca27780 100644 --- a/lua/lazyvim/plugins/extras/ui/smear-cursor.lua +++ b/lua/lazyvim/plugins/extras/ui/smear-cursor.lua @@ -9,7 +9,7 @@ return { specs = { -- disable mini.animate cursor { - "echasnovski/mini.animate", + "nvim-mini/mini.animate", optional = true, opts = { cursor = { enable = false }, diff --git a/lua/lazyvim/plugins/extras/util/chezmoi.lua b/lua/lazyvim/plugins/extras/util/chezmoi.lua index 6c88fc45..2c1b2f31 100644 --- a/lua/lazyvim/plugins/extras/util/chezmoi.lua +++ b/lua/lazyvim/plugins/extras/util/chezmoi.lua @@ -135,7 +135,7 @@ return { -- Filetype icons { - "echasnovski/mini.icons", + "nvim-mini/mini.icons", opts = { file = { [".chezmoiignore"] = { glyph = "", hl = "MiniIconsGrey" }, diff --git a/lua/lazyvim/plugins/extras/util/mini-hipatterns.lua b/lua/lazyvim/plugins/extras/util/mini-hipatterns.lua index 287c0d77..b8fa4d1a 100644 --- a/lua/lazyvim/plugins/extras/util/mini-hipatterns.lua +++ b/lua/lazyvim/plugins/extras/util/mini-hipatterns.lua @@ -4,7 +4,7 @@ local M = {} M.hl = {} M.plugin = { - "echasnovski/mini.hipatterns", + "nvim-mini/mini.hipatterns", recommended = true, desc = "Highlight colors in your code. Also includes Tailwind CSS support.", event = "LazyFile", diff --git a/lua/lazyvim/plugins/extras/util/project.lua b/lua/lazyvim/plugins/extras/util/project.lua index 01a25bc2..dafaa594 100644 --- a/lua/lazyvim/plugins/extras/util/project.lua +++ b/lua/lazyvim/plugins/extras/util/project.lua @@ -134,7 +134,7 @@ return { }, { - "echasnovski/mini.starter", + "nvim-mini/mini.starter", optional = true, opts = function(_, opts) local items = { diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 7985825a..9dd7254b 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -245,7 +245,7 @@ return { -- icons { - "echasnovski/mini.icons", + "nvim-mini/mini.icons", lazy = true, opts = { file = { diff --git a/lua/lazyvim/util/plugin.lua b/lua/lazyvim/util/plugin.lua index 9fede549..ff3f3634 100644 --- a/lua/lazyvim/util/plugin.lua +++ b/lua/lazyvim/util/plugin.lua @@ -1,3 +1,4 @@ +local Meta = require("lazy.core.meta") local Plugin = require("lazy.core.plugin") ---@class lazyvim.util.plugin @@ -102,9 +103,17 @@ function M.fix_imports() end function M.fix_renames() - Plugin.Spec.add = LazyVim.inject.args(Plugin.Spec.add, function(self, plugin) + ---@param plugin LazyPluginSpec + Meta.add = LazyVim.inject.args(Meta.add, function(self, plugin) if type(plugin) == "table" then - if M.renames[plugin[1]] then + local name = plugin[1] + if not name then + return + end + if name:find("echasnovski") then + M.renames[name] = name:gsub("echasnovski", "nvim-mini") + end + if M.renames[name] then LazyVim.warn( ("Plugin `%s` was renamed to `%s`.\nPlease update your config for `%s`"):format( plugin[1], @@ -113,7 +122,7 @@ function M.fix_renames() ), { title = "LazyVim" } ) - plugin[1] = M.renames[plugin[1]] + plugin[1] = M.renames[name] end end end) diff --git a/tests/minit.lua b/tests/minit.lua index 807a2ac5..c7240d96 100644 --- a/tests/minit.lua +++ b/tests/minit.lua @@ -11,6 +11,6 @@ require("lazy.minit").setup({ { "nvim-treesitter/nvim-treesitter" }, { "mason-org/mason-lspconfig.nvim", version = "^1.0.0" }, { "mason-org/mason.nvim", version = "^1.0.0" }, - { "echasnovski/mini.icons", opts = {} }, + { "nvim-mini/mini.icons", opts = {} }, }, }) From 3aa2916569df2664cb68e1c7c38882868f36f8d0 Mon Sep 17 00:00:00 2001 From: S1M0N38 Date: Mon, 15 Sep 2025 11:49:11 +0200 Subject: [PATCH 016/103] fix(extras): disable blink path source in CopilotChat (#5666) (#5754) Fix #5666 with the answer given in the discussion. - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. Co-authored-by: svirschevskiy --- .../plugins/extras/ai/copilot-chat.lua | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lua/lazyvim/plugins/extras/ai/copilot-chat.lua b/lua/lazyvim/plugins/extras/ai/copilot-chat.lua index 58169b1e..fbf4ee39 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot-chat.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot-chat.lua @@ -85,4 +85,24 @@ return { }) end, }, + + -- Blink integration + { + "saghen/blink.cmp", + optional = true, + ---@module 'blink.cmp' + ---@type blink.cmp.Config + opts = { + sources = { + providers = { + path = { + -- Path sources triggered by "/" interfere with CopilotChat commands + enabled = function() + return vim.bo.filetype ~= "copilot-chat" + end, + }, + }, + }, + }, + }, } From 773f28b4912d5505a21da9686d56ab7cf41a9be7 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Mon, 15 Sep 2025 13:08:19 +0300 Subject: [PATCH 017/103] fix(mason): migrate to mason v2 (#6053) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description `mason-lspconfig` v2 made changes to conform with latest Neovim `vim.lsp.config`/`vim.lsp.enable` API. - Lock `mason` and `mason-lspconfig` to v1 versions for Neovim <0.11 and latest HEAD for Neovim >=0.11. - Change `:get_install_path()` method in LazyVim to use `LazyVim.get_pkg_path()` and also update name references to new ones. - Change `nvim-lspconfig` from `LazyFile` to `{ "BufReadPre", "BufNewFile", "BufWritePre" }` for Neovim >=0.11, since on `BufReadPost` the LSP would not attach on the first buffer. Previously the `setup.handlers()` function from `mason-lspconfig` would take care of that, but that has been removed on v2. I fail to think if there's a better way to handle this. Most of the changes in `/lsp/init.lua` are thanks to @williamboman comment [here](https://github.com/LazyVim/LazyVim/pull/6041#issuecomment-2857266471). I've also seen that both `mason-lspconfig` and `rustaceanvim` now have as minimum requirements Neovim >=0.11. As such I would suggest, instead of all the conditional checks for Neovim versions to create a stable release where we pin `mason` and `mason-lspconfig` to v1 versions and then only incorporate William's suggestions in a new release and mention in the README that users who are on Neovim <0.11 should use the stable release where the plugin versions are pinned to v1. Not sure how you want to tackle this, so this is merely just a suggestion from my part. Both #6041 and #6045 tackle only with the new name references and the offending line that was causing the error, but don't take into consideration the LSP servers configurations. `opts.setup` would not execute on both, since that was handled by `setup_handlers()` function in the past. I checked with Typescript lang and with those PRs there are no Javascript settings in `vtsls` (by checking with `:=LazyVim.opts("nvim-lspconfig").servers.vtsls`). #6045 also tried to change the method `:get_install_pkg()` by using `vim.fn.exepath`, but to my understanding that only returns the binary path not the package installation path and that is later concatenated to find other paths, which I believe is not correct. PS: There are 2 commits, because my LazyVim fork was not up to date and updated it and then merged the branch I had into a new branch. Sorry if that causes any inconvenience. ## Related Issue(s) Fixes #6039 ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --------- Co-authored-by: Folke Lemaitre Co-authored-by: William Boman Co-authored-by: Luis Durão --- lua/lazyvim/plugins/extras/lang/java.lua | 11 +--- lua/lazyvim/plugins/extras/lang/php.lua | 5 +- lua/lazyvim/plugins/extras/lang/rust.lua | 10 +--- lua/lazyvim/plugins/lsp/init.lua | 71 +++++++++++++----------- lua/lazyvim/util/init.lua | 17 ++++-- tests/extras/extra_spec.lua | 3 +- tests/minit.lua | 4 +- 7 files changed, 63 insertions(+), 58 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 8098b6b3..9e5047cf 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -87,8 +87,7 @@ return { opts = function() local cmd = { vim.fn.exepath("jdtls") } if LazyVim.has("mason.nvim") then - local mason_registry = require("mason-registry") - local lombok_jar = mason_registry.get_package("jdtls"):get_install_path() .. "/lombok.jar" + local lombok_jar = vim.fn.expand("$MASON/share/jdtls/lombok.jar") table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar)) end return { @@ -151,17 +150,13 @@ return { if LazyVim.has("mason.nvim") then local mason_registry = require("mason-registry") if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then - local java_dbg_pkg = mason_registry.get_package("java-debug-adapter") - local java_dbg_path = java_dbg_pkg:get_install_path() local jar_patterns = { - java_dbg_path .. "/extension/server/com.microsoft.java.debug.plugin-*.jar", + vim.fn.expand("$MASON/share/java-debug-adapter/com.microsoft.java.debug.plugin-*.jar"), } -- java-test also depends on java-debug-adapter. if opts.test and mason_registry.is_installed("java-test") then - local java_test_pkg = mason_registry.get_package("java-test") - local java_test_path = java_test_pkg:get_install_path() vim.list_extend(jar_patterns, { - java_test_path .. "/extension/server/*.jar", + vim.fn.expand("$MASON/share/java-test/*.jar"), }) end for _, jar_pattern in ipairs(jar_patterns) do diff --git a/lua/lazyvim/plugins/extras/lang/php.lua b/lua/lazyvim/plugins/extras/lang/php.lua index 5a2835aa..04469223 100644 --- a/lua/lazyvim/plugins/extras/lang/php.lua +++ b/lua/lazyvim/plugins/extras/lang/php.lua @@ -48,11 +48,10 @@ return { optional = true, opts = function() local dap = require("dap") - local path = require("mason-registry").get_package("php-debug-adapter"):get_install_path() dap.adapters.php = { type = "executable", - command = "node", - args = { path .. "/extension/out/phpDebug.js" }, + command = "php-debug-adapter", + args = {}, } end, }, diff --git a/lua/lazyvim/plugins/extras/lang/rust.lua b/lua/lazyvim/plugins/extras/lang/rust.lua index eca1b597..b66dde9b 100644 --- a/lua/lazyvim/plugins/extras/lang/rust.lua +++ b/lua/lazyvim/plugins/extras/lang/rust.lua @@ -110,13 +110,9 @@ return { }, config = function(_, opts) if LazyVim.has("mason.nvim") then - local package_path = require("mason-registry").get_package("codelldb"):get_install_path() - local codelldb = package_path .. "/extension/adapter/codelldb" - local library_path = package_path .. "/extension/lldb/lib/liblldb.dylib" - local uname = io.popen("uname"):read("*l") - if uname == "Linux" then - library_path = package_path .. "/extension/lldb/lib/liblldb.so" - end + local codelldb = vim.fn.exepath("codelldb") + local codelldb_lib_ext = io.popen("uname"):read("*l") == "Linux" and ".so" or ".dylib" + local library_path = vim.fn.expand("$MASON/opt/lldb/lib/liblldb" .. codelldb_lib_ext) opts.dap = { adapter = require("rustaceanvim.config").get_codelldb_adapter(codelldb, library_path), } diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 54f410fc..b1d6a23d 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -2,7 +2,7 @@ return { -- lspconfig { "neovim/nvim-lspconfig", - event = "LazyFile", + event = { "BufReadPre", "BufNewFile", "BufWritePre" }, dependencies = { "mason.nvim", { "mason-org/mason-lspconfig.nvim", config = function() end }, @@ -174,31 +174,35 @@ return { opts.capabilities or {} ) - local function setup(server) - local server_opts = vim.tbl_deep_extend("force", { - capabilities = vim.deepcopy(capabilities), - }, servers[server] or {}) - if server_opts.enabled == false then - return - end - - if opts.setup[server] then - if opts.setup[server](server, server_opts) then - return - end - elseif opts.setup["*"] then - if opts.setup["*"](server, server_opts) then - return - end - end - require("lspconfig")[server].setup(server_opts) - end - -- get all the servers that are available through mason-lspconfig local have_mason, mlsp = pcall(require, "mason-lspconfig") local all_mslp_servers = {} - if have_mason then - all_mslp_servers = vim.tbl_keys(require("mason-lspconfig.mappings.server").lspconfig_to_package) + all_mslp_servers = vim.tbl_keys(require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package) + + local exclude_automatic_enable = {} ---@type string[] + + local function configure(server) + local server_opts = vim.tbl_deep_extend("force", { + capabilities = vim.deepcopy(capabilities), + }, servers[server] or {}) + + if opts.setup[server] then + if opts.setup[server](server, server_opts) then + return true + end + elseif opts.setup["*"] then + if opts.setup["*"](server, server_opts) then + return true + end + end + vim.lsp.config(server, server_opts) + + -- manually enable if mason=false or if this is a server that cannot be installed with mason-lspconfig + if server_opts.mason == false or not vim.tbl_contains(all_mslp_servers, server) then + vim.lsp.enable(server) + return true + end + return false end local ensure_installed = {} ---@type string[] @@ -207,24 +211,31 @@ return { server_opts = server_opts == true and {} or server_opts if server_opts.enabled ~= false then -- run manual setup if mason=false or if this is a server that cannot be installed with mason-lspconfig - if server_opts.mason == false or not vim.tbl_contains(all_mslp_servers, server) then - setup(server) + if configure(server) then + exclude_automatic_enable[#exclude_automatic_enable + 1] = server else ensure_installed[#ensure_installed + 1] = server end + else + exclude_automatic_enable[#exclude_automatic_enable + 1] = server end end end if have_mason then - mlsp.setup({ + local setup_config = { ensure_installed = vim.tbl_deep_extend( "force", ensure_installed, LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {} ), - handlers = { setup }, - }) + } + + setup_config.automatic_enable = { + exclude = exclude_automatic_enable, + } + + mlsp.setup(setup_config) end if LazyVim.lsp.is_enabled("denols") and LazyVim.lsp.is_enabled("vtsls") then @@ -278,8 +289,4 @@ return { end) end, }, - - -- pin to v1 for now - { "mason-org/mason.nvim", version = "^1.0.0" }, - { "mason-org/mason-lspconfig.nvim", version = "^1.0.0" }, } diff --git a/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index 4b49f539..339fdadb 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -253,11 +253,18 @@ function M.get_pkg_path(pkg, path, opts) opts = opts or {} opts.warn = opts.warn == nil and true or opts.warn path = path or "" - local ret = root .. "/packages/" .. pkg .. "/" .. path - if opts.warn and not vim.loop.fs_stat(ret) and not require("lazy.core.config").headless() then - M.warn( - ("Mason package path not found for **%s**:\n- `%s`\nYou may need to force update the package."):format(pkg, path) - ) + local ret = vim.fs.normalize(root .. "/packages/" .. pkg .. "/" .. path) + if opts.warn then + vim.schedule(function() + if not require("lazy.core.config").headless() and not vim.loop.fs_stat(ret) then + M.warn( + ("Mason package path not found for **%s**:\n- `%s`\nYou may need to force update the package."):format( + pkg, + path + ) + ) + end + end) end return ret end diff --git a/tests/extras/extra_spec.lua b/tests/extras/extra_spec.lua index 2afb6b94..2a4a9bc8 100644 --- a/tests/extras/extra_spec.lua +++ b/tests/extras/extra_spec.lua @@ -26,7 +26,8 @@ describe("Extra", function() return not vim.tbl_contains(ignore, extra.modname) end, extras) - local lsp_to_pkg = require("mason-lspconfig.mappings.server").lspconfig_to_package + local lsp_to_pkg = {} + lsp_to_pkg = require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package local tsspec = Plugin.Spec.new({ import = "lazyvim.plugins.treesitter", diff --git a/tests/minit.lua b/tests/minit.lua index c7240d96..41907e75 100644 --- a/tests/minit.lua +++ b/tests/minit.lua @@ -9,8 +9,8 @@ require("lazy.minit").setup({ { dir = vim.uv.cwd() }, { "LazyVim/starter" }, { "nvim-treesitter/nvim-treesitter" }, - { "mason-org/mason-lspconfig.nvim", version = "^1.0.0" }, - { "mason-org/mason.nvim", version = "^1.0.0" }, + { "mason-org/mason-lspconfig.nvim" }, + { "mason-org/mason.nvim" }, { "nvim-mini/mini.icons", opts = {} }, }, }) From 5e7da4384d2ebd1a5f48119d0793f54a447f2db9 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 12:12:43 +0200 Subject: [PATCH 018/103] docs: updated news --- NEWS.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/NEWS.md b/NEWS.md index 9d00ddd6..9fc3f95a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,17 @@ # What's new? +## 15.x + +**Neovim** `>= 0.11.0` includes a lot of changes to the underlying LSP implementation. + +Going forward, **LazyVim** requires **Neovim** `>= 0.11.0`, and drops support for older versions. + +### Changes + +- removed compatibility code for Neovim `< 0.11` +- updated all LSP code to use the new LSP implementation +- migrated **mason.nvim** and **mason-lspconfig.nvim** to `v2.x` + ## 14.x Big new release with a lot of changes and improvements! From 0d27e89a362d541fadc9713dbdcea86c124b93de Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 16:28:46 +0200 Subject: [PATCH 019/103] refactor(lsp): cleanup lsp config --- lua/lazyvim/plugins/extras/lang/ruby.lua | 3 +- lua/lazyvim/plugins/lsp/init.lua | 70 ++++++++++-------------- 2 files changed, 31 insertions(+), 42 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/ruby.lua b/lua/lazyvim/plugins/extras/lang/ruby.lua index 65620f4e..e9c68d11 100644 --- a/lua/lazyvim/plugins/extras/lang/ruby.lua +++ b/lua/lazyvim/plugins/extras/lang/ruby.lua @@ -21,9 +21,8 @@ return { }, { "neovim/nvim-lspconfig", - ---@class PluginLspOpts + ---@type PluginLspOpts opts = { - ---@type lspconfig.options servers = { ruby_lsp = { enabled = lsp == "ruby_lsp", diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index b1d6a23d..f4bdce22 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -63,7 +63,7 @@ return { timeout_ms = nil, }, -- LSP Server Settings - ---@type lspconfig.options + ---@type table servers = { lua_ls = { -- mason = false, -- set to false if you don't want this server to be installed with mason @@ -99,7 +99,7 @@ return { }, -- you can do any additional lsp server setup here -- return true if you don't want this server to be setup with lspconfig - ---@type table + ---@type table setup = { -- example to setup with typescript.nvim -- tsserver = function(_, opts) @@ -149,6 +149,7 @@ return { end) end + -- diagnostics if type(opts.diagnostics.virtual_text) == "table" and opts.diagnostics.virtual_text.prefix == "icons" then opts.diagnostics.virtual_text.prefix = function(diagnostic) local icons = LazyVim.config.icons.diagnostics @@ -157,48 +158,42 @@ return { return icon end end + return "●" end end - vim.diagnostic.config(vim.deepcopy(opts.diagnostics)) - local servers = opts.servers - local has_cmp, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp") - local has_blink, blink = pcall(require, "blink.cmp") local capabilities = vim.tbl_deep_extend( "force", {}, vim.lsp.protocol.make_client_capabilities(), - has_cmp and cmp_nvim_lsp.default_capabilities() or {}, - has_blink and blink.get_lsp_capabilities() or {}, + LazyVim.has("nvim-cmp") and require("cmp_nvim_lsp").default_capabilities() or {}, + LazyVim.has("blink.nvim") and require("blink.cmp").get_lsp_capabilities() or {}, opts.capabilities or {} ) -- get all the servers that are available through mason-lspconfig - local have_mason, mlsp = pcall(require, "mason-lspconfig") - local all_mslp_servers = {} - all_mslp_servers = vim.tbl_keys(require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package) + local have_mason = LazyVim.has("mason-lspconfig.nvim") + local mason_all = have_mason + and vim.tbl_keys(require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package) + or {} --[[ @as string[] ]] local exclude_automatic_enable = {} ---@type string[] local function configure(server) local server_opts = vim.tbl_deep_extend("force", { capabilities = vim.deepcopy(capabilities), - }, servers[server] or {}) + }, opts.servers[server] or {}) - if opts.setup[server] then - if opts.setup[server](server, server_opts) then - return true - end - elseif opts.setup["*"] then - if opts.setup["*"](server, server_opts) then - return true - end + local setup = opts.setup[server] or opts.setup["*"] + if setup and setup(server, server_opts) then + return true -- lsp will be setup by the setup function end + vim.lsp.config(server, server_opts) -- manually enable if mason=false or if this is a server that cannot be installed with mason-lspconfig - if server_opts.mason == false or not vim.tbl_contains(all_mslp_servers, server) then + if server_opts.mason == false or not vim.tbl_contains(mason_all, server) then vim.lsp.enable(server) return true end @@ -206,36 +201,31 @@ return { end local ensure_installed = {} ---@type string[] - for server, server_opts in pairs(servers) do - if server_opts then - server_opts = server_opts == true and {} or server_opts - if server_opts.enabled ~= false then - -- run manual setup if mason=false or if this is a server that cannot be installed with mason-lspconfig - if configure(server) then - exclude_automatic_enable[#exclude_automatic_enable + 1] = server - else - ensure_installed[#ensure_installed + 1] = server - end - else + for server, server_opts in pairs(opts.servers) do + server_opts = server_opts == true and {} or server_opts or false + if server_opts and server_opts.enabled ~= false then + -- run manual setup if mason=false or if this is a server that cannot be installed with mason-lspconfig + if configure(server) then exclude_automatic_enable[#exclude_automatic_enable + 1] = server + else + ensure_installed[#ensure_installed + 1] = server end + else + exclude_automatic_enable[#exclude_automatic_enable + 1] = server end end if have_mason then - local setup_config = { + require("mason-lspconfig").setup({ ensure_installed = vim.tbl_deep_extend( "force", ensure_installed, LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {} ), - } - - setup_config.automatic_enable = { - exclude = exclude_automatic_enable, - } - - mlsp.setup(setup_config) + automatic_enable = { + exclude = exclude_automatic_enable, + }, + }) end if LazyVim.lsp.is_enabled("denols") and LazyVim.lsp.is_enabled("vtsls") then From 5668ad72ca806b3a7915bb7b35dcc5cccfe774f7 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 17:13:40 +0200 Subject: [PATCH 020/103] feat(extras): added an experimental extra for the treesitter `main` branch --- NEWS.md | 11 +-- .../plugins/extras/ui/treesitter-main.lua | 87 +++++++++++++++++++ 2 files changed, 89 insertions(+), 9 deletions(-) create mode 100644 lua/lazyvim/plugins/extras/ui/treesitter-main.lua diff --git a/NEWS.md b/NEWS.md index 9fc3f95a..37221e79 100644 --- a/NEWS.md +++ b/NEWS.md @@ -11,6 +11,8 @@ Going forward, **LazyVim** requires **Neovim** `>= 0.11.0`, and drops support fo - removed compatibility code for Neovim `< 0.11` - updated all LSP code to use the new LSP implementation - migrated **mason.nvim** and **mason-lspconfig.nvim** to `v2.x` +- added new `treesitter-main` extra to test the new `main` branch of `nvim-treesitter` + - after enabling, you will get errors. Update with `:Lazy` and restart Neovim ## 14.x @@ -122,7 +124,6 @@ vim.g.snacks_animate = false ## 11.x - **Keymaps:** - - `gB` to open the current repo in the browser - `gco` and `gcO` to add a comment below or above the current line - `wm` to toggle window maximize @@ -135,7 +136,6 @@ vim.g.snacks_animate = false It's a great plugin that enhances the native text objects. - `:LazyExtras` now has multiple new sections: - - **Enabled**: extras that are currently enabled - **Recommended Languages**: language extras recommended for the current buffer / directory - **Recommended Plugins**: extras that are recommended for most users @@ -173,7 +173,6 @@ Additionally, some core plugins have been moved to extras. ``` - plugins moved to extras: - - `mini.surround` - `mini.indentscope` scopes are now also highlighted with `indent-blankline` - `nvim-treesitter-context` @@ -191,7 +190,6 @@ Additionally, some core plugins have been moved to extras. You can find the updated docs [here](https://github.com/folke/trouble.nvim/tree/dev) - The **lazygit** integration now configures: - - the theme based on the colorscheme - nerd font icons (v3) - editor preset is set to `nvim-remote` for better interop with Neovim @@ -232,9 +230,7 @@ Additionally, some core plugins have been moved to extras. - New `:LazyExtras` command for managing **LazyVim** extras - Improved **formatting**: - - **LazyVim** can now work with multiple formatters. Types: - - **primary**: only one primary formatter can be active at a time. _(conform, none-ls, LSP)_ - **secondary**: multiple secondary formatters can be active _(eslint, ...)_ @@ -253,18 +249,15 @@ Additionally, some core plugins have been moved to extras. ``` - `none-ls.nvim` is no longer installed by default - - `conform.nvim` is now the default formatter - `nvim-lint` is now the default linter - If you want to keep using `none-ls.nvim`, you can enable the **lsp.none-ls** extra - `dashboard.nvim` is the new default dashboard plugin - - If you want to keep using `alpha.nvim`, you can enable the **ui.alpha** extra - Improved **root detection**: - - New `:LazyRoot` command that shows info about the root dir detection - Configurable with `vim.g.root_spec` diff --git a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua new file mode 100644 index 00000000..934d311a --- /dev/null +++ b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua @@ -0,0 +1,87 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + version = false, -- last release is way too old and doesn't work on Windows + branch = "main", + build = ":TSUpdate", + lazy = true, + cmd = { "TSUpdate", "TSInstall", "TSLog", "TSUninstall" }, + enabled = function() + if vim.fn.executable("tree-sitter") == 0 then + LazyVim.error("**treesitter-main** requires the `tree-sitter` executable to be installed") + return false + end + return true + end, + init = function() end, + ---@param opts TSConfig + config = function(_, opts) + if type(opts.ensure_installed) ~= "table" then + error("opts.ensure_installed must be a table") + end + + local TS = require("nvim-treesitter") + TS.setup(opts) + + local needed = LazyVim.dedup(opts.ensure_installed --[[@as string[] ]]) + local installed = TS.get_installed("parsers") + local install = vim.tbl_filter(function(lang) + return not vim.tbl_contains(installed, lang) + end, needed) + + if #install > 0 then + TS.install(install, { summary = true }) + end + + -- backwards compatibility with the old treesitter config for indent + if vim.tbl_get(opts, "indent", "enable") then + vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" + end + + -- backwards compatibility with the old treesitter config for highlight + if vim.tbl_get(opts, "highlight", "enable") then + vim.api.nvim_create_autocmd("FileType", { + callback = function() + pcall(vim.treesitter.start) + end, + }) + end + end, + }, + { + "nvim-treesitter/nvim-treesitter-textobjects", + branch = "main", + event = "VeryLazy", + opts = {}, + keys = function() + local moves = { + goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" }, + goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" }, + goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" }, + goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" }, + } + local ret = {} ---@type LazyKeysSpec[] + for method, keymaps in pairs(moves) do + for key, query in pairs(keymaps) do + local desc = query:gsub("@", ""):gsub("%..*", "") + desc = desc:sub(1, 1):upper() .. desc:sub(2) + desc = (key:sub(1, 1) == "[" and "Prev " or "Next ") .. desc + desc = desc .. (key:sub(2, 2) == key:sub(2, 2):upper() and " End" or " Start") + ret[#ret + 1] = { + key, + function() + require("nvim-treesitter-textobjects.move")[method](query, "textobjects") + end, + desc = desc, + mode = { "n", "x", "o" }, + silent = true, + } + end + end + return ret + end, + config = function(_, opts) + require("nvim-treesitter-textobjects").setup(opts) + end, + }, +} From 44ade7fdea98a0356c64ff9edaf2534547b958bc Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 17:15:51 +0200 Subject: [PATCH 021/103] fix(lsp): buffer should be second arg for supports_method --- lua/lazyvim/util/lsp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/util/lsp.lua b/lua/lazyvim/util/lsp.lua index 02ab8b6e..074346d3 100644 --- a/lua/lazyvim/util/lsp.lua +++ b/lua/lazyvim/util/lsp.lua @@ -64,7 +64,7 @@ function M._check_methods(client, buffer) for method, clients in pairs(M._supports_method) do clients[client] = clients[client] or {} if not clients[client][buffer] then - if client.supports_method and client:supports_method(method, { bufnr = buffer }) then + if client.supports_method and client:supports_method(method, buffer) then clients[client][buffer] = true vim.api.nvim_exec_autocmds("User", { pattern = "LspSupportsMethod", @@ -107,7 +107,7 @@ function M.on_supports_method(method, fn) }) end ----@return _.lspconfig.options +---@return vim.lsp.Config function M.get_config(server) local configs = require("lspconfig.configs") return rawget(configs, server) From 96316e5a69b4cc45311f5b7225e7d7bea1f977ee Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 17:17:21 +0200 Subject: [PATCH 022/103] fix(treesitter-main): move exe check to config --- lua/lazyvim/plugins/extras/ui/treesitter-main.lua | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua index 934d311a..8987b732 100644 --- a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua +++ b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua @@ -6,16 +6,13 @@ return { build = ":TSUpdate", lazy = true, cmd = { "TSUpdate", "TSInstall", "TSLog", "TSUninstall" }, - enabled = function() - if vim.fn.executable("tree-sitter") == 0 then - LazyVim.error("**treesitter-main** requires the `tree-sitter` executable to be installed") - return false - end - return true - end, init = function() end, ---@param opts TSConfig config = function(_, opts) + if vim.fn.executable("tree-sitter") == 0 then + LazyVim.error("**treesitter-main** requires the `tree-sitter` executable to be installed") + return + end if type(opts.ensure_installed) ~= "table" then error("opts.ensure_installed must be a table") end From 167d39b2bef24024be1a48267e14cc6c82146462 Mon Sep 17 00:00:00 2001 From: Jinfeng Guo Date: Mon, 15 Sep 2025 23:19:23 +0800 Subject: [PATCH 023/103] fix(clangd): rewrite the root_dir function (#6060) ## Description Nvim 0.11 had some breaking changes in lsp related parts. And one of them is that if the root_dir field of lsp config is a function, the bufnr and a function would be passed instead of the file name in nvim 0.10. As a result, the configurations of extra.lang.clangd broke. However, before the breaking changes of mason and mason-lspconfig, the configurations of clangd still worked. So maybe what really broke the configurations is mason-lspconfig, which uses a new way to enable lsp in v2. I rewrite the root_dir function and make it work both on 0.11 and 0.10. It would check whether the first argument is a string to decide whether to adapt the new interface. To test whether it works, you can just add a plugin/clangd.lua to you personal config with the content below: ```lua return { "neovim/nvim-lspconfig", opts = { servers = { clangd = { root_dir = function(bufnr, ondir) local root_directory = function(fname) return require("lspconfig.util").root_pattern( "Makefile", "configure.ac", "configure.in", "config.h.in", "meson.build", "meson_options.txt", "build.ninja" )(fname) or require("lspconfig.util").root_pattern("compile_commands.json", "compile_flags.txt")( fname ) or require("lspconfig.util").find_git_ancestor(fname) end if type(bufnr) == "string" then return root_directory(bufnr) else local fname = vim.api.nvim_buf_get_name(bufnr) ondir(root_directory(fname)) end end, }, }, }, } ``` ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/clangd.lua | 33 ++++++++++++++-------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/clangd.lua b/lua/lazyvim/plugins/extras/lang/clangd.lua index 33dc4ed4..19f3d1c2 100644 --- a/lua/lazyvim/plugins/extras/lang/clangd.lua +++ b/lua/lazyvim/plugins/extras/lang/clangd.lua @@ -60,18 +60,27 @@ return { keys = { { "ch", "ClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, }, - root_dir = function(fname) - return require("lspconfig.util").root_pattern( - "Makefile", - "configure.ac", - "configure.in", - "config.h.in", - "meson.build", - "meson_options.txt", - "build.ninja" - )(fname) or require("lspconfig.util").root_pattern("compile_commands.json", "compile_flags.txt")( - fname - ) or require("lspconfig.util").find_git_ancestor(fname) + root_dir = function(bufnr, ondir) + local root_directory = function(fname) + return require("lspconfig.util").root_pattern( + "Makefile", + "configure.ac", + "configure.in", + "config.h.in", + "meson.build", + "meson_options.txt", + "build.ninja" + )(fname) or require("lspconfig.util").root_pattern( + "compile_commands.json", + "compile_flags.txt" + )(fname) or require("lspconfig.util").find_git_ancestor(fname) + end + if type(bufnr) == "string" then + return root_directory(bufnr) + else + local fname = vim.api.nvim_buf_get_name(bufnr) + ondir(root_directory(fname)) + end end, capabilities = { offsetEncoding = { "utf-16" }, From 23b9cdeb3471b655532e9884fa2dd36ee83062d5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 20:42:10 +0200 Subject: [PATCH 024/103] fix(lspconfig): remove all references to lspconfig. Closes #6426 --- lua/lazyvim/plugins/extras/lang/clangd.lua | 38 +++++++++----------- lua/lazyvim/plugins/extras/lang/java.lua | 4 +-- lua/lazyvim/plugins/extras/lang/ocaml.lua | 20 +++++------ lua/lazyvim/plugins/extras/lang/r.lua | 6 +--- lua/lazyvim/plugins/extras/lang/tailwind.lua | 3 +- lua/lazyvim/plugins/lsp/init.lua | 25 ++++++++----- lua/lazyvim/util/lsp.lua | 33 ----------------- 7 files changed, 44 insertions(+), 85 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/clangd.lua b/lua/lazyvim/plugins/extras/lang/clangd.lua index 19f3d1c2..9417b257 100644 --- a/lua/lazyvim/plugins/extras/lang/clangd.lua +++ b/lua/lazyvim/plugins/extras/lang/clangd.lua @@ -60,28 +60,22 @@ return { keys = { { "ch", "ClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, }, - root_dir = function(bufnr, ondir) - local root_directory = function(fname) - return require("lspconfig.util").root_pattern( - "Makefile", - "configure.ac", - "configure.in", - "config.h.in", - "meson.build", - "meson_options.txt", - "build.ninja" - )(fname) or require("lspconfig.util").root_pattern( - "compile_commands.json", - "compile_flags.txt" - )(fname) or require("lspconfig.util").find_git_ancestor(fname) - end - if type(bufnr) == "string" then - return root_directory(bufnr) - else - local fname = vim.api.nvim_buf_get_name(bufnr) - ondir(root_directory(fname)) - end - end, + root_markers = { + ".clangd", + ".clang-tidy", + ".clang-format", + "compile_commands.json", + "compile_flags.txt", + "configure.ac", -- AutoTools + "Makefile", + "configure.ac", + "configure.in", + "config.h.in", + "meson.build", + "meson_options.txt", + "build.ninja", + ".git", + }, capabilities = { offsetEncoding = { "utf-16" }, }, diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 9e5047cf..43c9442f 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -91,9 +91,7 @@ return { table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar)) end return { - -- How to find the root dir for a given filename. The default comes from - -- lspconfig which provides a function specifically for java projects. - root_dir = LazyVim.lsp.get_raw_config("jdtls").default_config.root_dir, + root_dir = vim.fs.root(0, vim.lsp.config.jdtls.root_markers), -- How to find the project name for a given root dir. project_name = function(root_dir) diff --git a/lua/lazyvim/plugins/extras/lang/ocaml.lua b/lua/lazyvim/plugins/extras/lang/ocaml.lua index 83f72a72..a8de495c 100644 --- a/lua/lazyvim/plugins/extras/lang/ocaml.lua +++ b/lua/lazyvim/plugins/extras/lang/ocaml.lua @@ -26,17 +26,15 @@ return { "reason", "dune", }, - root_dir = function(fname) - return require("lspconfig.util").root_pattern( - "*.opam", - "esy.json", - "package.json", - ".git", - "dune-project", - "dune-workspace", - "*.ml" - )(fname) - end, + root_markers = { + "*.opam", + "esy.json", + "package.json", + ".git", + "dune-project", + "dune-workspace", + "*.ml", + }, }, }, }, diff --git a/lua/lazyvim/plugins/extras/lang/r.lua b/lua/lazyvim/plugins/extras/lang/r.lua index 6320f624..f8feb0ea 100644 --- a/lua/lazyvim/plugins/extras/lang/r.lua +++ b/lua/lazyvim/plugins/extras/lang/r.lua @@ -65,11 +65,7 @@ return { opts = { servers = { r_language_server = { - root_dir = function(fname) - return require("lspconfig.util").root_pattern("DESCRIPTION", "NAMESPACE", ".Rbuildignore")(fname) - or require("lspconfig.util").find_git_ancestor(fname) - or vim.loop.os_homedir() - end, + root_markers = { "DESCRIPTION", "NAMESPACE", ".Rbuildignore" }, }, }, }, diff --git a/lua/lazyvim/plugins/extras/lang/tailwind.lua b/lua/lazyvim/plugins/extras/lang/tailwind.lua index cbdd612e..3c7b3fac 100644 --- a/lua/lazyvim/plugins/extras/lang/tailwind.lua +++ b/lua/lazyvim/plugins/extras/lang/tailwind.lua @@ -28,11 +28,10 @@ return { }, setup = { tailwindcss = function(_, opts) - local tw = LazyVim.lsp.get_raw_config("tailwindcss") opts.filetypes = opts.filetypes or {} -- Add default filetypes - vim.list_extend(opts.filetypes, tw.default_config.filetypes) + vim.list_extend(opts.filetypes, vim.lsp.config.tailwindcss.filetypes) -- Remove excluded filetypes --- @param ft string diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index f4bdce22..335da15e 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -228,15 +228,22 @@ return { }) end - if LazyVim.lsp.is_enabled("denols") and LazyVim.lsp.is_enabled("vtsls") then - local is_deno = require("lspconfig.util").root_pattern("deno.json", "deno.jsonc") - LazyVim.lsp.disable("vtsls", is_deno) - LazyVim.lsp.disable("denols", function(root_dir, config) - if not is_deno(root_dir) then - config.settings.deno.enable = false - end - return false - end) + if vim.lsp.is_enabled("denols") and vim.lsp.is_enabled("vtsls") then + ---@param server string + ---@param markers string[] + local resolve = function(server, markers) + vim.lsp.config(server, { + root_dir = function(bufnr, on_dir) + local is_deno = vim.fs.root(bufnr, { "deno.json", "deno.jsonc" }) ~= nil + if is_deno == (server == "denols") then + local root = vim.fs.root(bufnr, markers) + return root and on_dir(root) + end + end, + }) + end + resolve("denols", vim.lsp.config.denols.root_markers) + resolve("vtsls", vim.lsp.config.vtsls.root_markers) end end, }, diff --git a/lua/lazyvim/util/lsp.lua b/lua/lazyvim/util/lsp.lua index 074346d3..632a7b9f 100644 --- a/lua/lazyvim/util/lsp.lua +++ b/lua/lazyvim/util/lsp.lua @@ -107,39 +107,6 @@ function M.on_supports_method(method, fn) }) end ----@return vim.lsp.Config -function M.get_config(server) - local configs = require("lspconfig.configs") - return rawget(configs, server) -end - ----@return {default_config:lspconfig.Config} -function M.get_raw_config(server) - local ok, ret = pcall(require, "lspconfig.configs." .. server) - if ok then - return ret - end - return require("lspconfig.server_configurations." .. server) -end - -function M.is_enabled(server) - local c = M.get_config(server) - return c and c.enabled ~= false -end - ----@param server string ----@param cond fun( root_dir, config): boolean -function M.disable(server, cond) - local util = require("lspconfig.util") - local def = M.get_config(server) - ---@diagnostic disable-next-line: undefined-field - def.document_config.on_new_config = util.add_hook_before(def.document_config.on_new_config, function(config, root_dir) - if cond(root_dir, config) then - config.enabled = false - end - end) -end - ---@param opts? LazyFormatter| {filter?: (string|lsp.Client.filter)} function M.formatter(opts) opts = opts or {} From 271fecb067ec223a8eab90c1abd1162e9ebae5df Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 20:44:14 +0200 Subject: [PATCH 025/103] fix(jdtls): root_dir --- lua/lazyvim/plugins/extras/lang/java.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 43c9442f..75971afb 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -91,7 +91,6 @@ return { table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar)) end return { - root_dir = vim.fs.root(0, vim.lsp.config.jdtls.root_markers), -- How to find the project name for a given root dir. project_name = function(root_dir) @@ -165,12 +164,10 @@ return { end end local function attach_jdtls() - local fname = vim.api.nvim_buf_get_name(0) - -- Configuration can be augmented and overridden by opts.jdtls local config = extend_or_override({ cmd = opts.full_cmd(opts), - root_dir = opts.root_dir(fname), + root_dir = vim.fs.root(0, vim.lsp.config.jdtls.root_markers), init_options = { bundles = bundles, }, From 2f75d9a90fc9cf43f7ba2365dbb745e5595fc02e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 21:00:19 +0200 Subject: [PATCH 026/103] fix(lsp): properly ambiguate denols vs vtsls --- lua/lazyvim/plugins/lsp/init.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 335da15e..48c96059 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -230,20 +230,24 @@ return { if vim.lsp.is_enabled("denols") and vim.lsp.is_enabled("vtsls") then ---@param server string - ---@param markers string[] - local resolve = function(server, markers) + local resolve = function(server) + local markers, root_dir = vim.lsp.config[server].root_markers, vim.lsp.config[server].root_dir vim.lsp.config(server, { root_dir = function(bufnr, on_dir) local is_deno = vim.fs.root(bufnr, { "deno.json", "deno.jsonc" }) ~= nil if is_deno == (server == "denols") then - local root = vim.fs.root(bufnr, markers) - return root and on_dir(root) + if root_dir then + return root_dir(bufnr, on_dir) + elseif type(markers) == "table" then + local root = vim.fs.root(bufnr, markers) + return root and on_dir(root) + end end end, }) end - resolve("denols", vim.lsp.config.denols.root_markers) - resolve("vtsls", vim.lsp.config.vtsls.root_markers) + resolve("denols") + resolve("vtsls") end end, }, From 2f309fc8b5bf93af25293c1e4688d409de718a36 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 21:14:42 +0200 Subject: [PATCH 027/103] perf(treesitter-main): only enable highlighting for installed treesitter langs --- lua/lazyvim/plugins/extras/ui/treesitter-main.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua index 8987b732..1571cc03 100644 --- a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua +++ b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua @@ -28,6 +28,7 @@ return { if #install > 0 then TS.install(install, { summary = true }) + vim.list_extend(installed, install) end -- backwards compatibility with the old treesitter config for indent @@ -38,8 +39,11 @@ return { -- backwards compatibility with the old treesitter config for highlight if vim.tbl_get(opts, "highlight", "enable") then vim.api.nvim_create_autocmd("FileType", { - callback = function() - pcall(vim.treesitter.start) + callback = function(ev) + local lang = vim.treesitter.language.get_lang(ev.match) + if vim.tbl_contains(installed, lang) then + pcall(vim.treesitter.start) + end end, }) end From 14d2a9baa1306bd0969112fcf8f69a11840cc5e6 Mon Sep 17 00:00:00 2001 From: "Md. Iftakhar Awal Chowdhury" <42291930+AtifChy@users.noreply.github.com> Date: Tue, 16 Sep 2025 01:17:45 +0600 Subject: [PATCH 028/103] fix(schemastore): use `before_init` instead of `on_new_config` to load schema store (#6427) ## Description `vim.lsp.config` doesn't provide `on_new_config`, which is causing `b0o/SchemaStore.nvim` fail to load. This PR replaces `on_new_config` with `before_init` fixing the issue. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/json.lua | 2 +- lua/lazyvim/plugins/extras/lang/yaml.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/json.lua b/lua/lazyvim/plugins/extras/lang/json.lua index d51a6b19..453a6a77 100644 --- a/lua/lazyvim/plugins/extras/lang/json.lua +++ b/lua/lazyvim/plugins/extras/lang/json.lua @@ -27,7 +27,7 @@ return { servers = { jsonls = { -- lazy-load schemastore when needed - on_new_config = function(new_config) + before_init = function(_, new_config) new_config.settings.json.schemas = new_config.settings.json.schemas or {} vim.list_extend(new_config.settings.json.schemas, require("schemastore").json.schemas()) end, diff --git a/lua/lazyvim/plugins/extras/lang/yaml.lua b/lua/lazyvim/plugins/extras/lang/yaml.lua index b460f3c5..9d8135e7 100644 --- a/lua/lazyvim/plugins/extras/lang/yaml.lua +++ b/lua/lazyvim/plugins/extras/lang/yaml.lua @@ -29,7 +29,7 @@ return { }, }, -- lazy-load schemastore when needed - on_new_config = function(new_config) + before_init = function(_, new_config) new_config.settings.yaml.schemas = vim.tbl_deep_extend( "force", new_config.settings.yaml.schemas or {}, From 011a35ccb810cbe5d25def9cc92271e8423feb74 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 16 Sep 2025 08:34:05 +0200 Subject: [PATCH 029/103] feat(blink): enable blink cmdline completions --- lua/lazyvim/plugins/extras/coding/blink.lua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index fe45b86b..9f5b2588 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -31,7 +31,7 @@ return { version = not vim.g.lazyvim_blink_main and "*", }, }, - event = "InsertEnter", + event = { "InsertEnter", "CmdlineEnter" }, ---@module 'blink.cmp' ---@type blink.cmp.Config @@ -41,6 +41,7 @@ return { return LazyVim.cmp.expand(snippet) end, }, + appearance = { -- sets the fallback highlight groups to nvim-cmp's highlight groups -- useful for when your theme doesn't support blink.cmp @@ -83,6 +84,19 @@ return { cmdline = { enabled = false, + keymap = { + preset = "cmdline", + -- [""] = { "show", "accept" }, + -- [""] = { "accept_and_enter", "fallback" }, + }, + completion = { + menu = { + auto_show = function(ctx) + return vim.fn.getcmdtype() == ":" + end, + }, + ghost_text = { enabled = true }, + }, }, keymap = { From 4961b3d4d4b2999816e978c3ea4ef7c320e4206d Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 16 Sep 2025 08:34:20 +0200 Subject: [PATCH 030/103] perf(blink): only enable lazydev in lua files --- lua/lazyvim/plugins/extras/coding/blink.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 9f5b2588..23ad6a80 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -51,6 +51,7 @@ return { -- adjusts spacing to ensure icons are aligned nerd_font_variant = "mono", }, + completion = { accept = { -- experimental auto-brackets support @@ -185,8 +186,9 @@ return { "saghen/blink.cmp", opts = { sources = { - -- add lazydev to your completion providers - default = { "lazydev" }, + per_filetype = { + lua = { inherit_defaults = true, "lazydev" }, + }, providers = { lazydev = { name = "LazyDev", From ff7c12c48e23941ffd9a7bbe61857624929ae9da Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 16 Sep 2025 08:34:57 +0200 Subject: [PATCH 031/103] feat(blink): enable cmdline completions --- lua/lazyvim/plugins/extras/coding/blink.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 23ad6a80..e8a4d9c5 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -84,7 +84,7 @@ return { }, cmdline = { - enabled = false, + enabled = true, keymap = { preset = "cmdline", -- [""] = { "show", "accept" }, From 45181a76ddcd89da209d2260f29e6d87f7cea511 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Tue, 16 Sep 2025 06:35:28 +0000 Subject: [PATCH 032/103] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 0b861808..a2b1b64c 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 15 +*LazyVim.txt* For Neovim Last change: 2025 September 16 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 44cc0635bc3d2ccc55eb76bc7668092befcf0536 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Tue, 16 Sep 2025 12:45:46 +0300 Subject: [PATCH 033/103] fix(ocaml): use `root_dir` instead of `root_markers` for globs support (#6428) ## Description As per [comment](https://github.com/LazyVim/LazyVim/commit/23b9cdeb3471b655532e9884fa2dd36ee83062d5#r165830889), use `root_dir` with `util.root_pattern` instead of `root_markers` for globs support. I don't actually do Ocaml to thoroughly test it, but it should work in theory :stuck_out_tongue: ## Related Issue(s) None ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/ocaml.lua | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/ocaml.lua b/lua/lazyvim/plugins/extras/lang/ocaml.lua index a8de495c..0e733a4a 100644 --- a/lua/lazyvim/plugins/extras/lang/ocaml.lua +++ b/lua/lazyvim/plugins/extras/lang/ocaml.lua @@ -26,15 +26,12 @@ return { "reason", "dune", }, - root_markers = { - "*.opam", - "esy.json", - "package.json", - ".git", - "dune-project", - "dune-workspace", - "*.ml", - }, + root_dir = function(bufnr, on_dir) + local util = require("lspconfig.util") + local fname = vim.api.nvim_buf_get_name(bufnr) + --stylua: ignore + on_dir(util.root_pattern("*.opam", "esy.json", "package.json", ".git", "dune-project", "dune-workspace", "*.ml")( fname)) + end, }, }, }, From c05392186e9e540d4af169922c333b5baa583cbe Mon Sep 17 00:00:00 2001 From: qw457812 <37494864+qw457812@users.noreply.github.com> Date: Tue, 16 Sep 2025 17:46:26 +0800 Subject: [PATCH 034/103] fix(jdtls): root_dir (#6429) Fix: ``` Failed to run `config` for nvim-jdtls ...im/lazy/LazyVim/lua/lazyvim/plugins/extras/lang/java.lua:113: attempt to call field 'root_dir' (a nil value) - /LazyVim/lua/lazyvim/plugins/extras/lang/java.lua:113 _in_ **full_cmd** - /LazyVim/lua/lazyvim/plugins/extras/lang/java.lua:169 _in_ **attach_jdtls** - /LazyVim/lua/lazyvim/plugins/extras/lang/java.lua:286 _in_ **config** - ~/.local/share/bob/nightly/share/nvim/runtime/filetype.lua:36 - vim/shared.lua:0 - ~/.local/share/bob/nightly/share/nvim/runtime/filetype.lua:35 - vim/_editor.lua:0 _in_ **cmd** - /persistence.nvim/lua/persistence/init.lua:88 _in_ **load** - lua:1 - vim/_editor.lua:0 _in_ **action** - /snacks.nvim/lua/snacks/dashboard.lua:693 ``` ## Description ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/java.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 75971afb..e4926521 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -91,6 +91,7 @@ return { table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar)) end return { + root_dir = require("lspconfig.util").root_pattern(vim.lsp.config.jdtls.root_markers), -- How to find the project name for a given root dir. project_name = function(root_dir) @@ -164,10 +165,12 @@ return { end end local function attach_jdtls() + local fname = vim.api.nvim_buf_get_name(0) + -- Configuration can be augmented and overridden by opts.jdtls local config = extend_or_override({ cmd = opts.full_cmd(opts), - root_dir = vim.fs.root(0, vim.lsp.config.jdtls.root_markers), + root_dir = opts.root_dir(fname), init_options = { bundles = bundles, }, From cc4a3e556424dba784b41ec3bd92eeb7b62746bc Mon Sep 17 00:00:00 2001 From: Christoph Schmidpeter <3390179+ChristophSchmidpeter@users.noreply.github.com> Date: Tue, 16 Sep 2025 11:47:05 +0200 Subject: [PATCH 035/103] fix(lang.haskell): prevent Haskell extras from installing telescope.nvim (#6419) ## Description Installing the Haskell extras currently installs telescope.nvim as well, since the dependency is not marked optional. This marks it optional so telescope.nvim is no longer pulled in automatically. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. Co-authored-by: Christoph Schmidpeter --- lua/lazyvim/plugins/extras/lang/haskell.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/haskell.lua b/lua/lazyvim/plugins/extras/lang/haskell.lua index a599d310..48634f2d 100644 --- a/lua/lazyvim/plugins/extras/lang/haskell.lua +++ b/lua/lazyvim/plugins/extras/lang/haskell.lua @@ -70,7 +70,7 @@ return { "luc-tielen/telescope_hoogle", ft = { "haskell", "lhaskell", "cabal", "cabalproject" }, dependencies = { - { "nvim-telescope/telescope.nvim" }, + { "nvim-telescope/telescope.nvim", optional = true }, }, config = function() local ok, telescope = pcall(require, "telescope") From b926e7db417bc7b0e80feb778bed7924ffe8e85d Mon Sep 17 00:00:00 2001 From: qw457812 <37494864+qw457812@users.noreply.github.com> Date: Tue, 16 Sep 2025 17:58:24 +0800 Subject: [PATCH 036/103] fix(treesitter-main): set vim.bo.indentexpr in FileType autocmd (#6430) ## Description Ref: https://github.com/nvim-treesitter/nvim-treesitter/blob/7aa24acae3a288e442e06928171f360bbdf75ba4/scripts/minimal_init.lua#L19-L24 ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- .../plugins/extras/ui/treesitter-main.lua | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua index 1571cc03..bb22aabb 100644 --- a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua +++ b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua @@ -31,19 +31,21 @@ return { vim.list_extend(installed, install) end - -- backwards compatibility with the old treesitter config for indent - if vim.tbl_get(opts, "indent", "enable") then - vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" - end - - -- backwards compatibility with the old treesitter config for highlight - if vim.tbl_get(opts, "highlight", "enable") then + -- backwards compatibility with the old treesitter config for highlight and indent + local highlight, indent = vim.tbl_get(opts, "highlight", "enable"), vim.tbl_get(opts, "indent", "enable") + if highlight or indent then vim.api.nvim_create_autocmd("FileType", { callback = function(ev) local lang = vim.treesitter.language.get_lang(ev.match) - if vim.tbl_contains(installed, lang) then + if not vim.tbl_contains(installed, lang) then + return + end + if highlight then pcall(vim.treesitter.start) end + if indent then + vim.bo[ev.buf].indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" + end end, }) end From 6e1de74597fa07ea805920da370f9d998740bc5e Mon Sep 17 00:00:00 2001 From: EJ <8498296+maddawik@users.noreply.github.com> Date: Tue, 16 Sep 2025 06:47:51 -0400 Subject: [PATCH 037/103] fix(refactoring): update funcs to return, add `expr=true`, operator mode (#5882) ## Description This fixes the keymaps for `refactoring.nvim` to work with the latest version (see issue linked below) ## Related Issue(s) - #5881 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- .../plugins/extras/editor/refactoring.lua | 35 ++++++++++++------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/refactoring.lua b/lua/lazyvim/plugins/extras/editor/refactoring.lua index 832940e9..11ab3786 100644 --- a/lua/lazyvim/plugins/extras/editor/refactoring.lua +++ b/lua/lazyvim/plugins/extras/editor/refactoring.lua @@ -30,34 +30,39 @@ return { "nvim-treesitter/nvim-treesitter", }, keys = { - { "r", "", desc = "+refactor", mode = { "n", "v" } }, + { "r", "", desc = "+refactor", mode = { "n", "x" } }, { "rs", pick, - mode = "v", + mode = { "n", "x" }, desc = "Refactor", }, { "ri", function() - require("refactoring").refactor("Inline Variable") + return require("refactoring").refactor("Inline Variable") end, - mode = { "n", "v" }, + mode = { "n", "x" }, desc = "Inline Variable", + expr = true, }, { "rb", function() - require("refactoring").refactor("Extract Block") + return require("refactoring").refactor("Extract Block") end, + mode = { "n", "x" }, desc = "Extract Block", + expr = true, }, { "rf", function() - require("refactoring").refactor("Extract Block To File") + return require("refactoring").refactor("Extract Block To File") end, + mode = { "n", "x" }, desc = "Extract Block To File", + expr = true, }, { "rP", @@ -71,6 +76,7 @@ return { function() require("refactoring").debug.print_var({ normal = true }) end, + mode = { "n", "x" }, desc = "Debug Print Variable", }, { @@ -83,33 +89,36 @@ return { { "rf", function() - require("refactoring").refactor("Extract Function") + return require("refactoring").refactor("Extract Function") end, - mode = "v", + mode = { "n", "x" }, desc = "Extract Function", + expr = true, }, { "rF", function() - require("refactoring").refactor("Extract Function To File") + return require("refactoring").refactor("Extract Function To File") end, - mode = "v", + mode = { "n", "x" }, desc = "Extract Function To File", + expr = true, }, { "rx", function() - require("refactoring").refactor("Extract Variable") + return require("refactoring").refactor("Extract Variable") end, - mode = "v", + mode = { "n", "x" }, desc = "Extract Variable", + expr = true, }, { "rp", function() require("refactoring").debug.print_var() end, - mode = "v", + mode = { "n", "x" }, desc = "Debug Print Variable", }, }, From 9fa832dc95cb77a5551bbeff12b4520d8b7bdc2a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 16 Sep 2025 15:41:20 +0200 Subject: [PATCH 038/103] fix(lsp): properly register capabilities with new vim.lsp.config. Not needed for blink --- lua/lazyvim/plugins/extras/coding/nvim-cmp.lua | 3 +++ lua/lazyvim/plugins/lsp/init.lua | 17 +++++------------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua b/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua index cdada25a..54bfbf7c 100644 --- a/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua +++ b/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua @@ -25,6 +25,9 @@ return { -- } -- ``` opts = function() + -- Register nvim-cmp lsp capabilities + vim.lsp.config("*", { capabilities = require("cmp_nvim_lsp").default_capabilities() }) + vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true }) local cmp = require("cmp") local defaults = require("cmp.config.default")() diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 48c96059..d0c9ced9 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -63,7 +63,7 @@ return { timeout_ms = nil, }, -- LSP Server Settings - ---@type table + ---@type table servers = { lua_ls = { -- mason = false, -- set to false if you don't want this server to be installed with mason @@ -163,14 +163,9 @@ return { end vim.diagnostic.config(vim.deepcopy(opts.diagnostics)) - local capabilities = vim.tbl_deep_extend( - "force", - {}, - vim.lsp.protocol.make_client_capabilities(), - LazyVim.has("nvim-cmp") and require("cmp_nvim_lsp").default_capabilities() or {}, - LazyVim.has("blink.nvim") and require("blink.cmp").get_lsp_capabilities() or {}, - opts.capabilities or {} - ) + if opts.capabilities then + vim.lsp.config("*", { capabilities = opts.capabilities }) + end -- get all the servers that are available through mason-lspconfig local have_mason = LazyVim.has("mason-lspconfig.nvim") @@ -181,9 +176,7 @@ return { local exclude_automatic_enable = {} ---@type string[] local function configure(server) - local server_opts = vim.tbl_deep_extend("force", { - capabilities = vim.deepcopy(capabilities), - }, opts.servers[server] or {}) + local server_opts = opts.servers[server] or {} local setup = opts.setup[server] or opts.setup["*"] if setup and setup(server, server_opts) then From f4e64eea45d9aa171e057ca328f2b9459c40404a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 16 Sep 2025 17:34:17 +0200 Subject: [PATCH 039/103] refactor(lsp): remove `LazyVim.lsp.get_clients` --- lua/lazyvim/plugins/extras/ai/copilot.lua | 2 +- lua/lazyvim/plugins/extras/editor/fzf.lua | 2 +- lua/lazyvim/plugins/extras/linting/eslint.lua | 2 +- lua/lazyvim/plugins/lsp/keymaps.lua | 4 ++-- lua/lazyvim/util/lsp.lua | 17 ++++------------- lua/lazyvim/util/root.lua | 4 ++-- 6 files changed, 11 insertions(+), 20 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index deebcd7d..48870743 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -49,7 +49,7 @@ return { opts.sections.lualine_x, 2, LazyVim.lualine.status(LazyVim.config.icons.kinds.Copilot, function() - local clients = package.loaded["copilot"] and LazyVim.lsp.get_clients({ name = "copilot", bufnr = 0 }) or {} + local clients = package.loaded["copilot"] and vim.lsp.get_clients({ name = "copilot", bufnr = 0 }) or {} if #clients > 0 then local status = require("copilot.status").data.status return (status == "InProgress" and "pending") or (status == "Warning" and "error") or "ok" diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index e9177457..31297b94 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -122,7 +122,7 @@ return { -- height is number of items minus 15 lines for the preview, with a max of 80% screen height height = math.floor(math.min(vim.o.lines * 0.8 - 16, #items + 2) + 0.5) + 16, width = 0.5, - preview = not vim.tbl_isempty(LazyVim.lsp.get_clients({ bufnr = 0, name = "vtsls" })) and { + preview = not vim.tbl_isempty(vim.lsp.get_clients({ bufnr = 0, name = "vtsls" })) and { layout = "vertical", vertical = "down:15,border-top", hidden = "hidden", diff --git a/lua/lazyvim/plugins/extras/linting/eslint.lua b/lua/lazyvim/plugins/extras/linting/eslint.lua index 01f134e2..92c670d4 100644 --- a/lua/lazyvim/plugins/extras/linting/eslint.lua +++ b/lua/lazyvim/plugins/extras/linting/eslint.lua @@ -27,7 +27,7 @@ return { end local function get_client(buf) - return LazyVim.lsp.get_clients({ name = "eslint", bufnr = buf })[1] + return vim.lsp.get_clients({ name = "eslint", bufnr = buf })[1] end local formatter = LazyVim.lsp.formatter({ diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index 748f5b29..9cde08c1 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -52,7 +52,7 @@ function M.has(buffer, method) return false end method = method:find("/") and method or "textDocument/" .. method - local clients = LazyVim.lsp.get_clients({ bufnr = buffer }) + local clients = vim.lsp.get_clients({ bufnr = buffer }) for _, client in ipairs(clients) do if client:supports_method(method) then return true @@ -69,7 +69,7 @@ function M.resolve(buffer) end local spec = vim.tbl_extend("force", {}, M.get()) local opts = LazyVim.opts("nvim-lspconfig") - local clients = LazyVim.lsp.get_clients({ bufnr = buffer }) + local clients = vim.lsp.get_clients({ bufnr = buffer }) for _, client in ipairs(clients) do local maps = opts.servers[client.name] and opts.servers[client.name].keys or {} vim.list_extend(spec, maps) diff --git a/lua/lazyvim/util/lsp.lua b/lua/lazyvim/util/lsp.lua index 632a7b9f..a857422f 100644 --- a/lua/lazyvim/util/lsp.lua +++ b/lua/lazyvim/util/lsp.lua @@ -1,15 +1,6 @@ ---@class lazyvim.util.lsp local M = {} ----@alias lsp.Client.filter {id?: number, bufnr?: number, name?: string, method?: string, filter?:fun(client: vim.lsp.Client):boolean} - ----@param opts? lsp.Client.filter -function M.get_clients(opts) - local ret = {} ---@type vim.lsp.Client[] - ret = vim.lsp.get_clients(opts) - return opts and opts.filter and vim.tbl_filter(opts.filter, ret) or ret -end - ---@param on_attach fun(client:vim.lsp.Client, buffer) ---@param name? string function M.on_attach(on_attach, name) @@ -107,12 +98,12 @@ function M.on_supports_method(method, fn) }) end ----@param opts? LazyFormatter| {filter?: (string|lsp.Client.filter)} +---@param opts? LazyFormatter| {filter?: (string|vim.lsp.get_clients.Filter)} function M.formatter(opts) opts = opts or {} local filter = opts.filter or {} filter = type(filter) == "string" and { name = filter } or filter - ---@cast filter lsp.Client.filter + ---@cast filter vim.lsp.get_clients.Filter ---@type LazyFormatter local ret = { name = "LSP", @@ -122,7 +113,7 @@ function M.formatter(opts) M.format(LazyVim.merge({}, filter, { bufnr = buf })) end, sources = function(buf) - local clients = M.get_clients(LazyVim.merge({}, filter, { bufnr = buf })) + local clients = vim.lsp.get_clients(LazyVim.merge({}, filter, { bufnr = buf })) ---@param client vim.lsp.Client local ret = vim.tbl_filter(function(client) return client:supports_method("textDocument/formatting") @@ -137,7 +128,7 @@ function M.formatter(opts) return LazyVim.merge(ret, opts) --[[@as LazyFormatter]] end ----@alias lsp.Client.format {timeout_ms?: number, format_options?: table} | lsp.Client.filter +---@alias lsp.Client.format {timeout_ms?: number, format_options?: table} | vim.lsp.get_clients.Filter ---@param opts? lsp.Client.format function M.format(opts) diff --git a/lua/lazyvim/util/root.lua b/lua/lazyvim/util/root.lua index fc6d6d7d..b3d68721 100644 --- a/lua/lazyvim/util/root.lua +++ b/lua/lazyvim/util/root.lua @@ -29,10 +29,10 @@ function M.detectors.lsp(buf) return {} end local roots = {} ---@type string[] - local clients = LazyVim.lsp.get_clients({ bufnr = buf }) + local clients = vim.lsp.get_clients({ bufnr = buf }) clients = vim.tbl_filter(function(client) return not vim.tbl_contains(vim.g.root_lsp_ignore or {}, client.name) - end, clients) + end, clients) --[[@as vim.lsp.Client[] ]] for _, client in pairs(clients) do local workspace = client.config.workspace_folders for _, ws in pairs(workspace or {}) do From f54fd7f751e902e824c3a4c9d212a0d18387d0b6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 16 Sep 2025 17:43:35 +0200 Subject: [PATCH 040/103] fix(blink): make blink completions in cmdline behave more like regular cmdline --- lua/lazyvim/plugins/extras/coding/blink.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index e8a4d9c5..207b1940 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -85,12 +85,9 @@ return { cmdline = { enabled = true, - keymap = { - preset = "cmdline", - -- [""] = { "show", "accept" }, - -- [""] = { "accept_and_enter", "fallback" }, - }, + keymap = { preset = "cmdline" }, completion = { + list = { selection = { preselect = false } }, menu = { auto_show = function(ctx) return vim.fn.getcmdtype() == ":" From cccfe70ea4390c1915f67ab7d2893971fba3f3fa Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 07:01:08 +0200 Subject: [PATCH 041/103] feat!: bump Neovim requirement to 0.11.2 --- NEWS.md | 6 +++--- README.md | 2 +- lua/lazyvim/health.lua | 6 +++--- lua/lazyvim/plugins/init.lua | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/NEWS.md b/NEWS.md index 37221e79..1e5d991b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,13 +2,13 @@ ## 15.x -**Neovim** `>= 0.11.0` includes a lot of changes to the underlying LSP implementation. +**Neovim** `>= 0.11.2` includes a lot of changes to the underlying LSP implementation. -Going forward, **LazyVim** requires **Neovim** `>= 0.11.0`, and drops support for older versions. +Going forward, **LazyVim** requires **Neovim** `>= 0.11.2`, and drops support for older versions. ### Changes -- removed compatibility code for Neovim `< 0.11` +- removed compatibility code for Neovim `< 0.11.2` - updated all LSP code to use the new LSP implementation - migrated **mason.nvim** and **mason-lspconfig.nvim** to `v2.x` - added new `treesitter-main` extra to test the new `main` branch of `nvim-treesitter` diff --git a/README.md b/README.md index fd6a3fe0..1e7bb70d 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ to tweak your config as needed, along with the convenience of a pre-configured s ## ⚡️ Requirements -- Neovim >= **0.11.0** (needs to be built with **LuaJIT**) +- Neovim >= **0.11.2** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) - a [Nerd Font](https://www.nerdfonts.com/) **_(optional)_** - a **C** compiler for `nvim-treesitter`. See [here](https://github.com/nvim-treesitter/nvim-treesitter#requirements) diff --git a/lua/lazyvim/health.lua b/lua/lazyvim/health.lua index 716c60a8..d1632e75 100644 --- a/lua/lazyvim/health.lua +++ b/lua/lazyvim/health.lua @@ -8,10 +8,10 @@ local error = vim.health.error or vim.health.report_error function M.check() start("LazyVim") - if vim.fn.has("nvim-0.11.0") == 1 then - ok("Using Neovim >= 0.11.0") + if vim.fn.has("nvim-0.11.2") == 1 then + ok("Using Neovim >= 0.11.2") else - error("Neovim >= 0.11.0 is required") + error("Neovim >= 0.11.2 is required") end for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit", "fzf", "curl" }) do diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index a0faebcd..7797b047 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -1,6 +1,6 @@ -if vim.fn.has("nvim-0.11.0") == 0 then +if vim.fn.has("nvim-0.11.2") == 0 then vim.api.nvim_echo({ - { "LazyVim requires Neovim >= 0.11.0\n", "ErrorMsg" }, + { "LazyVim requires Neovim >= 0.11.2\n", "ErrorMsg" }, { "For more info, see: https://github.com/LazyVim/LazyVim/issues/6421\n", "Comment" }, { "Press any key to exit", "MoreMsg" }, }, true, {}) From f88f33c4c62272486c481589850019e8e4f4bd31 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Wed, 17 Sep 2025 05:01:57 +0000 Subject: [PATCH 042/103] chore(build): auto-generate docs --- doc/LazyVim.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index a2b1b64c..9f4b59fd 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 16 +*LazyVim.txt* For Neovim Last change: 2025 September 17 ============================================================================== Table of Contents *LazyVim-table-of-contents* @@ -53,7 +53,7 @@ FEATURES *LazyVim-features* REQUIREMENTS *LazyVim-requirements* -- Neovim >= **0.11.0** (needs to be built with **LuaJIT**) +- Neovim >= **0.11.2** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) - a Nerd Font **(optional)** - a **C** compiler for `nvim-treesitter`. See here From 732b063c30ff1167c470063a64a538e109914cad Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 07:06:27 +0200 Subject: [PATCH 043/103] docs: more news --- NEWS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 1e5d991b..8f59998f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,10 +9,11 @@ Going forward, **LazyVim** requires **Neovim** `>= 0.11.2`, and drops support fo ### Changes - removed compatibility code for Neovim `< 0.11.2` -- updated all LSP code to use the new LSP implementation +- cconfigure **LSP** with the native `vim.lsp.config` - migrated **mason.nvim** and **mason-lspconfig.nvim** to `v2.x` - added new `treesitter-main` extra to test the new `main` branch of `nvim-treesitter` - after enabling, you will get errors. Update with `:Lazy` and restart Neovim +- enabled [blink.cmp](https://github.com/saghen/blink.cmp) **cmdline** completions ## 14.x From 919c9e5d091f11b2892c56825249fc4a495d3e8f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 07:14:22 +0200 Subject: [PATCH 044/103] fix(eslint): remove old 0.10 code --- lua/lazyvim/plugins/extras/linting/eslint.lua | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/lua/lazyvim/plugins/extras/linting/eslint.lua b/lua/lazyvim/plugins/extras/linting/eslint.lua index 92c670d4..fd860f9b 100644 --- a/lua/lazyvim/plugins/extras/linting/eslint.lua +++ b/lua/lazyvim/plugins/extras/linting/eslint.lua @@ -10,7 +10,7 @@ return { "neovim/nvim-lspconfig", -- other settings removed for brevity opts = { - ---@type lspconfig.options + ---@type table servers = { eslint = { settings = { @@ -26,10 +26,6 @@ return { return end - local function get_client(buf) - return vim.lsp.get_clients({ name = "eslint", bufnr = buf })[1] - end - local formatter = LazyVim.lsp.formatter({ name = "eslint: lsp", primary = false, @@ -37,24 +33,6 @@ return { filter = "eslint", }) - -- Use EslintFixAll on Neovim < 0.10.0 - if not pcall(require, "vim.lsp._dynamic") then - formatter.name = "eslint: EslintFixAll" - formatter.sources = function(buf) - local client = get_client(buf) - return client and { "eslint" } or {} - end - formatter.format = function(buf) - local client = get_client(buf) - if client then - local diag = vim.diagnostic.get(buf, { namespace = vim.lsp.diagnostic.get_namespace(client.id) }) - if #diag > 0 then - vim.cmd("EslintFixAll") - end - end - end - end - -- register the formatter with LazyVim LazyVim.format.register(formatter) end, From 64ee23f38f9a29400673821a4adbbf058c428a5e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 07:14:37 +0200 Subject: [PATCH 045/103] style: remove references to Neovim 0.10 --- lua/lazyvim/config/options.lua | 2 +- lua/lazyvim/plugins/lsp/init.lua | 5 ++--- lua/lazyvim/util/ui.lua | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index b5d444d0..fbbb208c 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -53,7 +53,7 @@ local opt = vim.opt opt.autowrite = true -- Enable auto write -- only set clipboard if not in ssh, to make sure the OSC 52 --- integration works automatically. Requires Neovim >= 0.10.0 +-- integration works automatically. opt.clipboard = vim.env.SSH_TTY and "" or "unnamedplus" -- Sync with system clipboard opt.completeopt = "menu,menuone,noselect" opt.conceallevel = 2 -- Hide * markup for bold and italic, but not markers with substitutions diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index d0c9ced9..c50694d9 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -20,7 +20,6 @@ return { source = "if_many", prefix = "●", -- this will set set the prefix to a function that returns the diagnostics icon based on the severity - -- this only works on a recent 0.10.0 build. Will be set to "●" when not supported -- prefix = "icons", }, severity_sort = true, @@ -33,14 +32,14 @@ return { }, }, }, - -- Enable this to enable the builtin LSP inlay hints on Neovim >= 0.10.0 + -- Enable this to enable the builtin LSP inlay hints on Neovim. -- Be aware that you also will need to properly configure your LSP server to -- provide the inlay hints. inlay_hints = { enabled = true, exclude = { "vue" }, -- filetypes for which you don't want to enable inlay hints }, - -- Enable this to enable the builtin LSP code lenses on Neovim >= 0.10.0 + -- Enable this to enable the builtin LSP code lenses on Neovim. -- Be aware that you also will need to properly configure your LSP server to -- provide the code lenses. codelens = { diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/ui.lua index c8c899d5..f36897aa 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/ui.lua @@ -1,7 +1,7 @@ ---@class lazyvim.util.ui local M = {} --- optimized treesitter foldexpr for Neovim >= 0.10.0 +-- optimized treesitter foldexpr function M.foldexpr() local buf = vim.api.nvim_get_current_buf() if vim.b[buf].ts_folds == nil then From 4a3b4a80a89fe5a52d30fbe4afe85c152878ab1b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 07:30:27 +0200 Subject: [PATCH 046/103] fix(vue): `volar` -> `vua_ls`. Fixes #6236. Closes #6238. Closes #6174 --- lua/lazyvim/plugins/extras/lang/vue.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/vue.lua b/lua/lazyvim/plugins/extras/lang/vue.lua index 85f47772..a45caee7 100644 --- a/lua/lazyvim/plugins/extras/lang/vue.lua +++ b/lua/lazyvim/plugins/extras/lang/vue.lua @@ -19,13 +19,7 @@ return { "neovim/nvim-lspconfig", opts = { servers = { - volar = { - init_options = { - vue = { - hybridMode = true, - }, - }, - }, + vue_ls = {}, vtsls = {}, }, }, From 5e2c4e62f28a85e0b27d5c97ea92af8c1ab74cef Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 08:11:33 +0200 Subject: [PATCH 047/103] feat(lsp): enable LSP folds when available --- lua/lazyvim/plugins/lsp/init.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index c50694d9..00a698fc 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -45,6 +45,12 @@ return { codelens = { enabled = false, }, + -- Enable this to enable the builtin LSP folding on Neovim. + -- Be aware that you also will need to properly configure your LSP server to + -- provide the folds. + folds = { + enabled = true, + }, -- add any global capabilities here capabilities = { workspace = { @@ -137,6 +143,14 @@ return { end) end + -- folds + if opts.folds.enabled then + LazyVim.lsp.on_supports_method("textDocument/foldingRange", function(client, buffer) + local win = vim.api.nvim_get_current_win() + vim.wo[win][0].foldexpr = "v:lua.vim.lsp.foldexpr()" + end) + end + -- code lens if opts.codelens.enabled and vim.lsp.codelens then LazyVim.lsp.on_supports_method("textDocument/codeLens", function(client, buffer) From 32ef7a9d39b6fe13c81f9e3e56439bf69fa80805 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 09:22:58 +0200 Subject: [PATCH 048/103] docs: typo --- NEWS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 8f59998f..567b75ed 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,11 +9,12 @@ Going forward, **LazyVim** requires **Neovim** `>= 0.11.2`, and drops support fo ### Changes - removed compatibility code for Neovim `< 0.11.2` -- cconfigure **LSP** with the native `vim.lsp.config` +- configure **LSP** with the native `vim.lsp.config` - migrated **mason.nvim** and **mason-lspconfig.nvim** to `v2.x` - added new `treesitter-main` extra to test the new `main` branch of `nvim-treesitter` - after enabling, you will get errors. Update with `:Lazy` and restart Neovim - enabled [blink.cmp](https://github.com/saghen/blink.cmp) **cmdline** completions +- use **LSP** based folding when available (disable with `nvim-lspconfig.folds.enabled = false`) ## 14.x From 5eac460c092103e5516bec345236853b9f35ec7c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 09:52:44 +0200 Subject: [PATCH 049/103] feat(treesitter)!: migrate to `nvim-treesitter` **main** branch --- NEWS.md | 4 +- lua/lazyvim/config/options.lua | 3 +- lua/lazyvim/plugins/editor.lua | 10 ++ .../plugins/extras/ui/treesitter-main.lua | 90 ---------- lua/lazyvim/plugins/treesitter.lua | 160 +++++++++--------- lua/lazyvim/util/plugin.lua | 1 + lua/lazyvim/util/ui.lua | 28 +-- 7 files changed, 113 insertions(+), 183 deletions(-) delete mode 100644 lua/lazyvim/plugins/extras/ui/treesitter-main.lua diff --git a/NEWS.md b/NEWS.md index 567b75ed..4f3a0d34 100644 --- a/NEWS.md +++ b/NEWS.md @@ -11,8 +11,8 @@ Going forward, **LazyVim** requires **Neovim** `>= 0.11.2`, and drops support fo - removed compatibility code for Neovim `< 0.11.2` - configure **LSP** with the native `vim.lsp.config` - migrated **mason.nvim** and **mason-lspconfig.nvim** to `v2.x` -- added new `treesitter-main` extra to test the new `main` branch of `nvim-treesitter` - - after enabling, you will get errors. Update with `:Lazy` and restart Neovim +- migrated to [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter/tree/main) **main** branch +- replace `nvim-treesitter` incremental selection with `flash.nvim`, since it is no longer supported - enabled [blink.cmp](https://github.com/saghen/blink.cmp) **cmdline** completions - use **LSP** based folding when available (disable with `nvim-lspconfig.folds.enabled = false`) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index fbbb208c..62c8242e 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -68,7 +68,7 @@ opt.fillchars = { diff = "╱", eob = " ", } -opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()" +opt.foldexpr = "v:lua.LazyVim.ui.foldexpr()" -- treesitter folds opt.foldlevel = 99 opt.foldmethod = "expr" opt.foldtext = "" @@ -78,6 +78,7 @@ opt.grepformat = "%f:%l:%c:%m" opt.grepprg = "rg --vimgrep" opt.ignorecase = true -- Ignore case opt.inccommand = "nosplit" -- preview incremental substitute +opt.indentexpr = "v:lua.LazyVim.ui.indentexpr()" -- treesitter indents opt.jumpoptions = "view" opt.laststatus = 3 -- global statusline opt.linebreak = true -- Wrap lines at convenient points diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 4aaf3d1f..9fdeffd9 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -40,6 +40,16 @@ return { { "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" }, { "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" }, { "", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" }, + -- Simulate nvim-treesitter incremental selection + { "", mode = { "n", "o", "x" }, + function() + require("flash").treesitter({ + actions = { + [""] = "next", + [""] = "prev" + } + }) + end, desc = "Treesitter Incremental Selection" }, }, }, diff --git a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua deleted file mode 100644 index bb22aabb..00000000 --- a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua +++ /dev/null @@ -1,90 +0,0 @@ -return { - { - "nvim-treesitter/nvim-treesitter", - version = false, -- last release is way too old and doesn't work on Windows - branch = "main", - build = ":TSUpdate", - lazy = true, - cmd = { "TSUpdate", "TSInstall", "TSLog", "TSUninstall" }, - init = function() end, - ---@param opts TSConfig - config = function(_, opts) - if vim.fn.executable("tree-sitter") == 0 then - LazyVim.error("**treesitter-main** requires the `tree-sitter` executable to be installed") - return - end - if type(opts.ensure_installed) ~= "table" then - error("opts.ensure_installed must be a table") - end - - local TS = require("nvim-treesitter") - TS.setup(opts) - - local needed = LazyVim.dedup(opts.ensure_installed --[[@as string[] ]]) - local installed = TS.get_installed("parsers") - local install = vim.tbl_filter(function(lang) - return not vim.tbl_contains(installed, lang) - end, needed) - - if #install > 0 then - TS.install(install, { summary = true }) - vim.list_extend(installed, install) - end - - -- backwards compatibility with the old treesitter config for highlight and indent - local highlight, indent = vim.tbl_get(opts, "highlight", "enable"), vim.tbl_get(opts, "indent", "enable") - if highlight or indent then - vim.api.nvim_create_autocmd("FileType", { - callback = function(ev) - local lang = vim.treesitter.language.get_lang(ev.match) - if not vim.tbl_contains(installed, lang) then - return - end - if highlight then - pcall(vim.treesitter.start) - end - if indent then - vim.bo[ev.buf].indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" - end - end, - }) - end - end, - }, - { - "nvim-treesitter/nvim-treesitter-textobjects", - branch = "main", - event = "VeryLazy", - opts = {}, - keys = function() - local moves = { - goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" }, - goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" }, - goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" }, - goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" }, - } - local ret = {} ---@type LazyKeysSpec[] - for method, keymaps in pairs(moves) do - for key, query in pairs(keymaps) do - local desc = query:gsub("@", ""):gsub("%..*", "") - desc = desc:sub(1, 1):upper() .. desc:sub(2) - desc = (key:sub(1, 1) == "[" and "Prev " or "Next ") .. desc - desc = desc .. (key:sub(2, 2) == key:sub(2, 2):upper() and " End" or " Start") - ret[#ret + 1] = { - key, - function() - require("nvim-treesitter-textobjects.move")[method](query, "textobjects") - end, - desc = desc, - mode = { "n", "x", "o" }, - silent = true, - } - end - end - return ret - end, - config = function(_, opts) - require("nvim-treesitter-textobjects").setup(opts) - end, - }, -} diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 0f0c8fe8..4b15ab87 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -1,43 +1,25 @@ return { - { - "folke/which-key.nvim", - opts = { - spec = { - { "", desc = "Decrement Selection", mode = "x" }, - { "", desc = "Increment Selection", mode = { "x", "n" } }, - }, - }, - }, -- Treesitter is a new parser generator tool that we can -- use in Neovim to power faster and more accurate -- syntax highlighting. { "nvim-treesitter/nvim-treesitter", + branch = "main", version = false, -- last release is way too old and doesn't work on Windows - build = ":TSUpdate", - event = { "LazyFile", "VeryLazy" }, - lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline - init = function(plugin) - -- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early - -- This is needed because a bunch of plugins no longer `require("nvim-treesitter")`, which - -- no longer trigger the **nvim-treesitter** module to be loaded in time. - -- Luckily, the only things that those plugins need are the custom queries, which we make available - -- during startup. - require("lazy.core.loader").add_to_rtp(plugin) - require("nvim-treesitter.query_predicates") + build = function() + local TS = require("nvim-treesitter") + if not TS.get_installed then + LazyVim.error("Please restart Neovim and run `:TSUpdate` to use the `nvim-treesitter` **main** branch.") + return + end + vim.cmd.TSUpdate() end, - cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" }, - keys = { - { "", desc = "Increment Selection" }, - { "", desc = "Decrement Selection", mode = "x" }, - }, + lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline + event = { "LazyFile", "VeryLazy" }, + cmd = { "TSUpdate", "TSInstall", "TSLog", "TSUninstall" }, opts_extend = { "ensure_installed" }, - ---@type TSConfig - ---@diagnostic disable-next-line: missing-fields opts = { - highlight = { enable = true }, - indent = { enable = true }, ensure_installed = { "bash", "c", @@ -64,65 +46,91 @@ return { "xml", "yaml", }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = "", - node_incremental = "", - scope_incremental = false, - node_decremental = "", - }, - }, - textobjects = { - move = { - enable = true, - goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" }, - goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" }, - goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" }, - goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" }, - }, - }, }, + ---@param plugin LazyPlugin ---@param opts TSConfig - config = function(_, opts) - if type(opts.ensure_installed) == "table" then - opts.ensure_installed = LazyVim.dedup(opts.ensure_installed) + config = function(plugin, opts) + if vim.fn.executable("tree-sitter") == 0 then + LazyVim.error("**treesitter-main** requires the `tree-sitter` executable to be installed") + return end - require("nvim-treesitter.configs").setup(opts) + if type(opts.ensure_installed) ~= "table" then + LazyVim.error("`nvim-treesitter` opts.ensure_installed must be a table") + end + + local TS = require("nvim-treesitter") + if not TS.get_installed then + LazyVim.error("Please use `:Lazy` and update `nvim-treesitter`") + return + end + TS.setup(opts) + + local needed = LazyVim.dedup(opts.ensure_installed --[[@as string[] ]]) + LazyVim.ui.installed = TS.get_installed("parsers") + + local install = vim.tbl_filter(function(lang) + return not LazyVim.ui.have(lang) + end, needed) + + if #install > 0 then + TS.install(install, { summary = true }):await(function() + LazyVim.ui.installed = TS.get_installed("parsers") + end) + end + + vim.api.nvim_create_autocmd("FileType", { + callback = function(ev) + if LazyVim.ui.have(ev.match) then + pcall(vim.treesitter.start) + end + end, + }) end, }, { "nvim-treesitter/nvim-treesitter-textobjects", + branch = "main", event = "VeryLazy", - enabled = true, - config = function() - -- If treesitter is already loaded, we need to run config again for textobjects - if LazyVim.is_loaded("nvim-treesitter") then - local opts = LazyVim.opts("nvim-treesitter") - require("nvim-treesitter.configs").setup({ textobjects = opts.textobjects }) - end - - -- When in diff mode, we want to use the default - -- vim text objects c & C instead of the treesitter ones. - local move = require("nvim-treesitter.textobjects.move") ---@type table - local configs = require("nvim-treesitter.configs") - for name, fn in pairs(move) do - if name:find("goto") == 1 then - move[name] = function(q, ...) - if vim.wo.diff then - local config = configs.get_module("textobjects.move")[name] ---@type table - for key, query in pairs(config or {}) do - if q == query and key:find("[%]%[][cC]") then - vim.cmd("normal! " .. key) - return - end + opts = {}, + keys = function() + local moves = { + goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" }, + goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" }, + goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" }, + goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" }, + } + local ret = {} ---@type LazyKeysSpec[] + for method, keymaps in pairs(moves) do + for key, query in pairs(keymaps) do + local desc = query:gsub("@", ""):gsub("%..*", "") + desc = desc:sub(1, 1):upper() .. desc:sub(2) + desc = (key:sub(1, 1) == "[" and "Prev " or "Next ") .. desc + desc = desc .. (key:sub(2, 2) == key:sub(2, 2):upper() and " End" or " Start") + ret[#ret + 1] = { + key, + function() + -- don't use treesitter if in diff mode and the key is one of the c/C keys + if vim.wo.diff and key:find("[cC]") then + return vim.cmd("normal! " .. key) end - end - return fn(q, ...) - end + require("nvim-treesitter-textobjects.move")[method](query, "textobjects") + end, + desc = desc, + mode = { "n", "x", "o" }, + silent = true, + } end end + return ret + end, + config = function(_, opts) + local TS = require("nvim-treesitter-textobjects") + if not TS.setup then + LazyVim.error("Please use `:Lazy` and update `nvim-treesitter`") + return + end + TS.setup(opts) end, }, diff --git a/lua/lazyvim/util/plugin.lua b/lua/lazyvim/util/plugin.lua index ff3f3634..58063385 100644 --- a/lua/lazyvim/util/plugin.lua +++ b/lua/lazyvim/util/plugin.lua @@ -17,6 +17,7 @@ M.deprecated_extras = { ["lazyvim.plugins.extras.ui.dashboard"] = "`dashboard.nvim` is now the default **LazyVim** starter.", ["lazyvim.plugins.extras.coding.native_snippets"] = "Native snippets are now the default for **Neovim >= 0.10**", ["lazyvim.plugins.extras.ui.treesitter-rewrite"] = "Disabled `treesitter-rewrite` extra for now. Not ready yet.", + ["lazyvim.plugins.extras.ui.treesitter-main"] = "the `nvim-treesitter` main branch is now used by default", ["lazyvim.plugins.extras.coding.mini-ai"] = "`mini.ai` is now a core LazyVim plugin (again)", ["lazyvim.plugins.extras.lazyrc"] = "local spec files are now a lazy.nvim feature", ["lazyvim.plugins.extras.editor.trouble-v3"] = "Trouble v3 has been merged in main", diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/ui.lua index f36897aa..19d5642e 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/ui.lua @@ -1,22 +1,22 @@ ---@class lazyvim.util.ui local M = {} --- optimized treesitter foldexpr +M.installed = {} ---@type string[] + +---@param ft string +function M.have(ft) + local lang = vim.treesitter.language.get_lang(ft) + return vim.tbl_contains(M.installed, lang) +end + function M.foldexpr() local buf = vim.api.nvim_get_current_buf() - if vim.b[buf].ts_folds == nil then - -- as long as we don't have a filetype, don't bother - -- checking if treesitter is available (it won't) - if vim.bo[buf].filetype == "" then - return "0" - end - if vim.bo[buf].filetype:find("dashboard") then - vim.b[buf].ts_folds = false - else - vim.b[buf].ts_folds = pcall(vim.treesitter.get_parser, buf) - end - end - return vim.b[buf].ts_folds and vim.treesitter.foldexpr() or "0" + return M.have(vim.b[buf].filetype) and vim.treesitter.foldexpr() or "0" +end + +function M.indentexpr() + local buf = vim.api.nvim_get_current_buf() + return M.have(vim.b[buf].filetype) and require("nvim-treesitter").indentexpr() or -1 end return M From e9344e5319b712e90cfe36521d4682f36aaaf297 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 10:10:34 +0200 Subject: [PATCH 050/103] docs: better error and ref to checkhealth for nvim-treesitter main --- NEWS.md | 2 ++ lua/lazyvim/plugins/treesitter.lua | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 4f3a0d34..050440b2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,6 +12,8 @@ Going forward, **LazyVim** requires **Neovim** `>= 0.11.2`, and drops support fo - configure **LSP** with the native `vim.lsp.config` - migrated **mason.nvim** and **mason-lspconfig.nvim** to `v2.x` - migrated to [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter/tree/main) **main** branch + - with the new version, the `tree-sitter` cli is **required** to install parsers + - best to run `:checkhealth nvim_treesitter` after updating - replace `nvim-treesitter` incremental selection with `flash.nvim`, since it is no longer supported - enabled [blink.cmp](https://github.com/saghen/blink.cmp) **cmdline** completions - use **LSP** based folding when available (disable with `nvim-lspconfig.folds.enabled = false`) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 4b15ab87..d65ce551 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -51,7 +51,10 @@ return { ---@param opts TSConfig config = function(plugin, opts) if vim.fn.executable("tree-sitter") == 0 then - LazyVim.error("**treesitter-main** requires the `tree-sitter` executable to be installed") + LazyVim.error({ + "**treesitter-main** requires the `tree-sitter` CLI executable to be installed.", + "Run `:checkhealth nvim_treesitter` for more information.", + }) return end if type(opts.ensure_installed) ~= "table" then From 6eed1781c185ea6d1f313aee60a7097448f473cb Mon Sep 17 00:00:00 2001 From: EasonMo Date: Wed, 17 Sep 2025 16:13:36 +0800 Subject: [PATCH 051/103] fix(gitsigns): use silent for gitsigns keymaps (#5841) ## Description When executing `ghs`, the command line window will flicker. Therefore, it should be run silently. ## Related Issue(s) None ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/editor.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 9fdeffd9..5abed1a3 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -153,7 +153,7 @@ return { local gs = package.loaded.gitsigns local function map(mode, l, r, desc) - vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc }) + vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc, silent = true }) end -- stylua: ignore start From fd1b02ae5740dc651cc43291391084dbe7b1b3c4 Mon Sep 17 00:00:00 2001 From: Nick Janetakis Date: Wed, 17 Sep 2025 04:14:48 -0400 Subject: [PATCH 052/103] fix(grug-far): add support for GrugFarWithin so it gets loaded by default (#5772) ## Description https://github.com/MagicDuck/grug-far.nvim is the default find and replace plugin for LazyVim. It recently added support for being able to do a find / replace within a visual selection to limit the scope of a search. It did that by introducing a new command called `:GrugFarWithin`. This PR adds that as a `cmd` so it gets loaded by default. Without this PR, you cannot call this command unless you first call `:GrugFar`. This was identified by the author of Grug Far. ## Related Issue(s) There is no issue in this repo, but this feature is related to: https://github.com/MagicDuck/grug-far.nvim/issues/357 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. I also want to give a shout-out to @MagicDuck who is the author of the plugin. He implemented this feature so fast and has been super helpful in his repo's issue tracker. --- lua/lazyvim/plugins/editor.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 5abed1a3..8fef8e9e 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -4,7 +4,7 @@ return { { "MagicDuck/grug-far.nvim", opts = { headerMaxWidth = 80 }, - cmd = "GrugFar", + cmd = { "GrugFar", "GrugFarWithin" }, keys = { { "sr", From 112b8848b55ba5161c6713219a200a51be67d859 Mon Sep 17 00:00:00 2001 From: Jorge Villalobos Date: Wed, 17 Sep 2025 04:15:21 -0400 Subject: [PATCH 053/103] chore(which-key): remove unnecessary icons (#5461) ## Description These are already handled by which-key exactly the same way, no need to re-declare them here. Removing them from here has no effect. ## Related Issue(s) N/A ## Screenshots ![Screenshot 2025-01-23 at 21 21 14](https://github.com/user-attachments/assets/d9f777e8-d514-4836-9314-03a66cc5a34b) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/editor.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 8fef8e9e..6e2c894e 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -74,8 +74,8 @@ return { { "gh", group = "hunks" }, { "q", group = "quit/session" }, { "s", group = "search" }, - { "u", group = "ui", icon = { icon = "󰙵 ", color = "cyan" } }, - { "x", group = "diagnostics/quickfix", icon = { icon = "󱖫 ", color = "green" } }, + { "u", group = "ui" }, + { "x", group = "diagnostics/quickfix" }, { "[", group = "prev" }, { "]", group = "next" }, { "g", group = "goto" }, From 014b5bf6ac9ec24c955d481882b5e8cb39846d97 Mon Sep 17 00:00:00 2001 From: Alexey Svirshchevskiy Date: Wed, 17 Sep 2025 10:40:37 +0200 Subject: [PATCH 054/103] docs(treesitter): fix checkhealth command (#6433) --- NEWS.md | 2 +- lua/lazyvim/plugins/treesitter.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 050440b2..9342acb2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -13,7 +13,7 @@ Going forward, **LazyVim** requires **Neovim** `>= 0.11.2`, and drops support fo - migrated **mason.nvim** and **mason-lspconfig.nvim** to `v2.x` - migrated to [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter/tree/main) **main** branch - with the new version, the `tree-sitter` cli is **required** to install parsers - - best to run `:checkhealth nvim_treesitter` after updating + - best to run `:checkhealth nvim-treesitter` after updating - replace `nvim-treesitter` incremental selection with `flash.nvim`, since it is no longer supported - enabled [blink.cmp](https://github.com/saghen/blink.cmp) **cmdline** completions - use **LSP** based folding when available (disable with `nvim-lspconfig.folds.enabled = false`) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index d65ce551..1d5abb2f 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -53,7 +53,7 @@ return { if vim.fn.executable("tree-sitter") == 0 then LazyVim.error({ "**treesitter-main** requires the `tree-sitter` CLI executable to be installed.", - "Run `:checkhealth nvim_treesitter` for more information.", + "Run `:checkhealth nvim-treesitter` for more information.", }) return end From ab657e95898648bae210815bd641aa1a1fae5472 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Wed, 17 Sep 2025 05:17:32 -0400 Subject: [PATCH 055/103] docs: improved plugin doc strings (#5657) ## Description This improves the comment strings that produce documentation for different plugins. I often look at the docs to learn what stuff is already installed, and this would help people like me to quickly understand what some of the plugins do. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/coding.lua | 14 +++++++++++--- lua/lazyvim/plugins/extras/ui/edgy.lua | 2 +- lua/lazyvim/plugins/extras/ui/mini-animate.lua | 3 ++- lua/lazyvim/plugins/extras/ui/smear-cursor.lua | 1 + lua/lazyvim/plugins/linting.lua | 2 ++ lua/lazyvim/plugins/ui.lua | 3 ++- 6 files changed, 19 insertions(+), 6 deletions(-) diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index 8b242eb8..7f6bb550 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -1,5 +1,7 @@ return { - -- auto pairs + -- Auto pairs + -- Automatically inserts a matching closing character + -- when you type an opening character like `"`, `[`, or `(`. { "nvim-mini/mini.pairs", event = "VeryLazy", @@ -20,14 +22,18 @@ return { end, }, - -- comments + -- Improves comment syntax, lets Neovim handle multiple + -- types of comments for a single language, and relaxes rules + -- for uncommenting. { "folke/ts-comments.nvim", event = "VeryLazy", opts = {}, }, - -- Better text-objects + -- Extends the a & i text objects, this adds the ability to select + -- arguments, function calls, text within quotes and brackets, and to + -- repeat those selections to select an outer text object. { "nvim-mini/mini.ai", event = "VeryLazy", @@ -64,6 +70,8 @@ return { end, }, + -- Configures LuaLS to support auto-completion and type checking + -- while editing your Neovim configuration. { "folke/lazydev.nvim", ft = "lua", diff --git a/lua/lazyvim/plugins/extras/ui/edgy.lua b/lua/lazyvim/plugins/extras/ui/edgy.lua index dbe76d1b..bf522270 100644 --- a/lua/lazyvim/plugins/extras/ui/edgy.lua +++ b/lua/lazyvim/plugins/extras/ui/edgy.lua @@ -1,5 +1,5 @@ return { - -- edgy + -- Create and display predefined window layouts. { "folke/edgy.nvim", event = "VeryLazy", diff --git a/lua/lazyvim/plugins/extras/ui/mini-animate.lua b/lua/lazyvim/plugins/extras/ui/mini-animate.lua index 5a3fdef6..b71c19a9 100644 --- a/lua/lazyvim/plugins/extras/ui/mini-animate.lua +++ b/lua/lazyvim/plugins/extras/ui/mini-animate.lua @@ -8,7 +8,8 @@ return { }, }, - -- setup animate + -- Animates many common Neovim actions, like scrolling, + -- moving the cursor, and resizing windows. { "nvim-mini/mini.animate", event = "VeryLazy", diff --git a/lua/lazyvim/plugins/extras/ui/smear-cursor.lua b/lua/lazyvim/plugins/extras/ui/smear-cursor.lua index 2ca27780..4ab6f03e 100644 --- a/lua/lazyvim/plugins/extras/ui/smear-cursor.lua +++ b/lua/lazyvim/plugins/extras/ui/smear-cursor.lua @@ -1,3 +1,4 @@ +-- Animates cursor movement with a smear effect. return { "sphamba/smear-cursor.nvim", event = "VeryLazy", diff --git a/lua/lazyvim/plugins/linting.lua b/lua/lazyvim/plugins/linting.lua index 46cf2898..9b1bed29 100644 --- a/lua/lazyvim/plugins/linting.lua +++ b/lua/lazyvim/plugins/linting.lua @@ -1,4 +1,6 @@ return { + -- Asynchronously calls language-specific linter tools and reports + -- their results via the `vim.diagnostic` module. { "mfussenegger/nvim-lint", event = "LazyFile", diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 9dd7254b..23afdc39 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -60,7 +60,8 @@ return { end, }, - -- statusline + -- Displays a fancy status line with git status, + -- LSP diagnostics, filetype information, and more. { "nvim-lualine/lualine.nvim", event = "VeryLazy", From aab503fda63f34cff6bce229f73ea5209e8afaf0 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Wed, 17 Sep 2025 05:19:29 -0400 Subject: [PATCH 056/103] fix(clangd): file detection improvements (#6436) ## Description As discussed in https://github.com/LazyVim/LazyVim/commit/23b9cdeb3471b655532e9884fa2dd36ee83062d5#r165937336, it'd be better to remove clang configuration files from influencing root dir detection. I've also added meson and ninja files to the extra's recommendation detection ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/clangd.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/clangd.lua b/lua/lazyvim/plugins/extras/lang/clangd.lua index 9417b257..0ba58aca 100644 --- a/lua/lazyvim/plugins/extras/lang/clangd.lua +++ b/lua/lazyvim/plugins/extras/lang/clangd.lua @@ -9,6 +9,8 @@ return { "compile_commands.json", "compile_flags.txt", "configure.ac", -- AutoTools + "meson.build", + "build.ninja", }, }) end, @@ -61,9 +63,6 @@ return { { "ch", "ClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, }, root_markers = { - ".clangd", - ".clang-tidy", - ".clang-format", "compile_commands.json", "compile_flags.txt", "configure.ac", -- AutoTools From 72e1ee5b0db02c5678e1ee1b82f720e4c32b0c74 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 15:33:37 +0200 Subject: [PATCH 057/103] refactor(treesitter): cleanup --- lua/lazyvim/config/options.lua | 4 +- lua/lazyvim/plugins/treesitter.lua | 42 ++++++++++----------- lua/lazyvim/util/deprecated.lua | 12 +++++- lua/lazyvim/util/init.lua | 24 +++++++----- lua/lazyvim/util/{ui.lua => treesitter.lua} | 17 +++++++-- 5 files changed, 61 insertions(+), 38 deletions(-) rename lua/lazyvim/util/{ui.lua => treesitter.lua} (51%) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index 62c8242e..f71f96df 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -68,7 +68,7 @@ opt.fillchars = { diff = "╱", eob = " ", } -opt.foldexpr = "v:lua.LazyVim.ui.foldexpr()" -- treesitter folds +opt.foldexpr = "v:lua.LazyVim.treesitter.foldexpr()" -- treesitter folds opt.foldlevel = 99 opt.foldmethod = "expr" opt.foldtext = "" @@ -78,7 +78,7 @@ opt.grepformat = "%f:%l:%c:%m" opt.grepprg = "rg --vimgrep" opt.ignorecase = true -- Ignore case opt.inccommand = "nosplit" -- preview incremental substitute -opt.indentexpr = "v:lua.LazyVim.ui.indentexpr()" -- treesitter indents +opt.indentexpr = "v:lua.LazyVim.treesitter.indentexpr()" -- treesitter indents opt.jumpoptions = "view" opt.laststatus = 3 -- global statusline opt.linebreak = true -- Wrap lines at convenient points diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 1d5abb2f..5462149a 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -19,7 +19,9 @@ return { event = { "LazyFile", "VeryLazy" }, cmd = { "TSUpdate", "TSInstall", "TSLog", "TSUninstall" }, opts_extend = { "ensure_installed" }, + ---@class lazyvim.TSConfig: TSConfig opts = { + -- LazyVim config for treesitter ensure_installed = { "bash", "c", @@ -47,43 +49,39 @@ return { "yaml", }, }, - ---@param plugin LazyPlugin - ---@param opts TSConfig - config = function(plugin, opts) - if vim.fn.executable("tree-sitter") == 0 then - LazyVim.error({ + ---@param opts lazyvim.TSConfig + config = function(_, opts) + local TS = require("nvim-treesitter") + + -- some quick sanity checks + if not TS.get_installed then + return LazyVim.error("Please use `:Lazy` and update `nvim-treesitter`") + elseif vim.fn.executable("tree-sitter") == 0 then + return LazyVim.error({ "**treesitter-main** requires the `tree-sitter` CLI executable to be installed.", "Run `:checkhealth nvim-treesitter` for more information.", }) - return - end - if type(opts.ensure_installed) ~= "table" then - LazyVim.error("`nvim-treesitter` opts.ensure_installed must be a table") + elseif type(opts.ensure_installed) ~= "table" then + return LazyVim.error("`nvim-treesitter` opts.ensure_installed must be a table") end - local TS = require("nvim-treesitter") - if not TS.get_installed then - LazyVim.error("Please use `:Lazy` and update `nvim-treesitter`") - return - end + -- setup treesitter TS.setup(opts) - local needed = LazyVim.dedup(opts.ensure_installed --[[@as string[] ]]) - LazyVim.ui.installed = TS.get_installed("parsers") - + -- install missing parsers local install = vim.tbl_filter(function(lang) - return not LazyVim.ui.have(lang) - end, needed) - + return not LazyVim.treesitter.have(lang) + end, opts.ensure_installed or {}) if #install > 0 then TS.install(install, { summary = true }):await(function() - LazyVim.ui.installed = TS.get_installed("parsers") + LazyVim.treesitter.get_installed(true) -- refresh the installed langs end) end + -- treesitter highlighting vim.api.nvim_create_autocmd("FileType", { callback = function(ev) - if LazyVim.ui.have(ev.match) then + if LazyVim.treesitter.have(ev.match) then pcall(vim.treesitter.start) end end, diff --git a/lua/lazyvim/util/deprecated.lua b/lua/lazyvim/util/deprecated.lua index 375bc9ca..3aad7318 100644 --- a/lua/lazyvim/util/deprecated.lua +++ b/lua/lazyvim/util/deprecated.lua @@ -1,3 +1,4 @@ +---@class lazyvim.util.deprecated local M = {} M.moved = { @@ -13,6 +14,7 @@ M.moved = { ui = { statuscolumn = { "Snacks.statuscolumn" }, bufremove = { "Snacks.bufdelete" }, + foldexpr = { "LazyVim.treesitter.foldexpr", stacktrace = false }, fg = { "{ fg = Snacks.util.color(...) }", fn = function(...) @@ -28,7 +30,7 @@ function M.decorate(name, mod) if not M.moved[name] then return mod end - setmetatable(mod, { + return setmetatable(mod, { __call = function(_, ...) local to = M.moved[name].__call[1] LazyVim.deprecate("LazyVim." .. name, to) @@ -38,7 +40,9 @@ function M.decorate(name, mod) __index = function(_, k) if M.moved[name][k] then local to = M.moved[name][k][1] - LazyVim.deprecate("LazyVim." .. name .. "." .. k, to) + LazyVim.deprecate("LazyVim." .. name .. "." .. k, to, { + stacktrace = M.moved[name][k].stacktrace, + }) if M.moved[name][k].fn then return M.moved[name][k].fn end @@ -55,6 +59,10 @@ function M.lazygit() return Snacks.lazygit end +function M.ui() + return M.decorate("ui", {}) +end + function M.toggle() LazyVim.deprecate("LazyVim.toggle", "Snacks.toggle") return { diff --git a/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index 339fdadb..7561b385 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -2,7 +2,7 @@ local LazyUtil = require("lazy.core.util") ---@class lazyvim.util: LazyUtilCore ---@field config LazyVimConfig ----@field ui lazyvim.util.ui +---@field treesitter lazyvim.util.treesitter ---@field lsp lazyvim.util.lsp ---@field root lazyvim.util.root ---@field terminal lazyvim.util.terminal @@ -16,14 +16,16 @@ local LazyUtil = require("lazy.core.util") ---@field mini lazyvim.util.mini ---@field pick lazyvim.util.pick ---@field cmp lazyvim.util.cmp +---@field deprecated lazyvim.util.deprecated local M = {} +M.deprecated = require("lazyvim.util.deprecated") setmetatable(M, { __index = function(t, k) if LazyUtil[k] then return LazyUtil[k] end - if k == "lazygit" or k == "toggle" then -- HACK: special case for lazygit + if M.deprecated[k] then return M.deprecated[k]() end ---@diagnostic disable-next-line: no-unknown @@ -125,13 +127,17 @@ function M.opts(name) return Plugin.values(plugin, "opts", false) end -function M.deprecate(old, new) - M.warn(("`%s` is deprecated. Please use `%s` instead"):format(old, new), { - title = "LazyVim", - once = true, - stacktrace = true, - stacklevel = 6, - }) +---@param opts? LazyNotifyOpts +function M.deprecate(old, new, opts) + M.warn( + ("`%s` is deprecated. Please use `%s` instead"):format(old, new), + vim.tbl_extend("force", { + title = "LazyVim", + once = true, + stacktrace = true, + stacklevel = 6, + }, opts or {}) + ) end -- delay notifications till vim.notify was replaced or after 500ms diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/treesitter.lua similarity index 51% rename from lua/lazyvim/util/ui.lua rename to lua/lazyvim/util/treesitter.lua index 19d5642e..84e279ce 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/treesitter.lua @@ -1,12 +1,23 @@ ----@class lazyvim.util.ui +---@class lazyvim.util.treesitter local M = {} -M.installed = {} ---@type string[] +M._installed = nil ---@type table? + +---@param force boolean? +function M.get_installed(force) + if not M._installed or force then + M._installed = {} + for _, lang in ipairs(require("nvim-treesitter").get_installed("parsers")) do + M._installed[lang] = lang + end + end + return M._installed +end ---@param ft string function M.have(ft) local lang = vim.treesitter.language.get_lang(ft) - return vim.tbl_contains(M.installed, lang) + return lang and M.get_installed()[lang] end function M.foldexpr() From 2c44d3306398fc7ca1cc02c2e9466944a2725030 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 15:40:17 +0200 Subject: [PATCH 058/103] chore(main): release 15.0.0 (#6422) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release *beep* *boop* --- ## [15.0.0](https://github.com/LazyVim/LazyVim/compare/v14.15.1...v15.0.0) (2025-09-17) ### ⚠ BREAKING CHANGES * **treesitter:** migrate to `nvim-treesitter` **main** branch * bump Neovim requirement to 0.11.2 * LazyVim now requires Neovim >= 0.11 See #6421 for more info ### Features * **blink:** enable blink cmdline completions ([011a35c](https://github.com/LazyVim/LazyVim/commit/011a35ccb810cbe5d25def9cc92271e8423feb74)) * **blink:** enable cmdline completions ([ff7c12c](https://github.com/LazyVim/LazyVim/commit/ff7c12c48e23941ffd9a7bbe61857624929ae9da)) * bump Neovim requirement to 0.11.2 ([cccfe70](https://github.com/LazyVim/LazyVim/commit/cccfe70ea4390c1915f67ab7d2893971fba3f3fa)) * **extras:** added an experimental extra for the treesitter `main` branch ([5668ad7](https://github.com/LazyVim/LazyVim/commit/5668ad72ca806b3a7915bb7b35dcc5cccfe774f7)) * LazyVim now requires Neovim >= 0.11 See [#6421](https://github.com/LazyVim/LazyVim/issues/6421) for more info ([e7ce65e](https://github.com/LazyVim/LazyVim/commit/e7ce65e1bb814f79ecb45bfeca934e997e0ee42c)) * **lsp:** enable LSP folds when available ([5e2c4e6](https://github.com/LazyVim/LazyVim/commit/5e2c4e62f28a85e0b27d5c97ea92af8c1ab74cef)) * **treesitter:** migrate to `nvim-treesitter` **main** branch ([5eac460](https://github.com/LazyVim/LazyVim/commit/5eac460c092103e5516bec345236853b9f35ec7c)) ### Bug Fixes * **blink:** make blink completions in cmdline behave more like regular cmdline ([f54fd7f](https://github.com/LazyVim/LazyVim/commit/f54fd7f751e902e824c3a4c9d212a0d18387d0b6)) * **catppuccin:** follow renamed integration ([#6354](https://github.com/LazyVim/LazyVim/issues/6354)) ([02d0c9a](https://github.com/LazyVim/LazyVim/commit/02d0c9aebddb902d9c974a38bb44db9bae4eac6d)) * **clangd:** file detection improvements ([#6436](https://github.com/LazyVim/LazyVim/issues/6436)) ([aab503f](https://github.com/LazyVim/LazyVim/commit/aab503fda63f34cff6bce229f73ea5209e8afaf0)) * **clangd:** rewrite the root_dir function ([#6060](https://github.com/LazyVim/LazyVim/issues/6060)) ([167d39b](https://github.com/LazyVim/LazyVim/commit/167d39b2bef24024be1a48267e14cc6c82146462)) * **eslint:** remove old 0.10 code ([919c9e5](https://github.com/LazyVim/LazyVim/commit/919c9e5d091f11b2892c56825249fc4a495d3e8f)) * **extras:** disable blink path source in CopilotChat ([#5666](https://github.com/LazyVim/LazyVim/issues/5666)) ([#5754](https://github.com/LazyVim/LazyVim/issues/5754)) ([3aa2916](https://github.com/LazyVim/LazyVim/commit/3aa2916569df2664cb68e1c7c38882868f36f8d0)) * **gitsigns:** use silent for gitsigns keymaps ([#5841](https://github.com/LazyVim/LazyVim/issues/5841)) ([6eed178](https://github.com/LazyVim/LazyVim/commit/6eed1781c185ea6d1f313aee60a7097448f473cb)) * **grug-far:** add support for GrugFarWithin so it gets loaded by default ([#5772](https://github.com/LazyVim/LazyVim/issues/5772)) ([fd1b02a](https://github.com/LazyVim/LazyVim/commit/fd1b02ae5740dc651cc43291391084dbe7b1b3c4)) * **harpoon:** keymaps for 1-9. Fixes [#6319](https://github.com/LazyVim/LazyVim/issues/6319) ([e2ba6bb](https://github.com/LazyVim/LazyVim/commit/e2ba6bb51107cbd076b53b49ed7be99fc2fa3991)) * **jdtls:** root_dir ([271fecb](https://github.com/LazyVim/LazyVim/commit/271fecb067ec223a8eab90c1abd1162e9ebae5df)) * **jdtls:** root_dir ([#6429](https://github.com/LazyVim/LazyVim/issues/6429)) ([c053921](https://github.com/LazyVim/LazyVim/commit/c05392186e9e540d4af169922c333b5baa583cbe)) * **lang.haskell:** prevent Haskell extras from installing telescope.nvim ([#6419](https://github.com/LazyVim/LazyVim/issues/6419)) ([cc4a3e5](https://github.com/LazyVim/LazyVim/commit/cc4a3e556424dba784b41ec3bd92eeb7b62746bc)) * **lsp:** buffer should be second arg for supports_method ([44ade7f](https://github.com/LazyVim/LazyVim/commit/44ade7fdea98a0356c64ff9edaf2534547b958bc)) * **lspconfig:** remove all references to lspconfig. Closes [#6426](https://github.com/LazyVim/LazyVim/issues/6426) ([23b9cde](https://github.com/LazyVim/LazyVim/commit/23b9cdeb3471b655532e9884fa2dd36ee83062d5)) * **lsp:** properly ambiguate denols vs vtsls ([2f75d9a](https://github.com/LazyVim/LazyVim/commit/2f75d9a90fc9cf43f7ba2365dbb745e5595fc02e)) * **lsp:** properly register capabilities with new vim.lsp.config. Not needed for blink ([9fa832d](https://github.com/LazyVim/LazyVim/commit/9fa832dc95cb77a5551bbeff12b4520d8b7bdc2a)) * **mason:** migrate to mason v2 ([#6053](https://github.com/LazyVim/LazyVim/issues/6053)) ([773f28b](https://github.com/LazyVim/LazyVim/commit/773f28b4912d5505a21da9686d56ab7cf41a9be7)) * **mini:** update mini plugin references from echasnovski to nvim-mini ([#6374](https://github.com/LazyVim/LazyVim/issues/6374)) ([ae3aaf2](https://github.com/LazyVim/LazyVim/commit/ae3aaf2dd3a04eb5dbc5b1e34843558c85e45ac2)) * **neo-tree:** import neo-tree Extra before edgy Extra ([#5763](https://github.com/LazyVim/LazyVim/issues/5763)) ([848dd31](https://github.com/LazyVim/LazyVim/commit/848dd3132af50f6d211d0c07166ea7c1a4259088)) * **ocaml:** use `root_dir` instead of `root_markers` for globs support ([#6428](https://github.com/LazyVim/LazyVim/issues/6428)) ([44cc063](https://github.com/LazyVim/LazyVim/commit/44cc0635bc3d2ccc55eb76bc7668092befcf0536)) * **refactoring:** update funcs to return, add `expr=true`, operator mode ([#5882](https://github.com/LazyVim/LazyVim/issues/5882)) ([6e1de74](https://github.com/LazyVim/LazyVim/commit/6e1de74597fa07ea805920da370f9d998740bc5e)) * remove 0.9 compat ([3516ae7](https://github.com/LazyVim/LazyVim/commit/3516ae736a333185f6f17b70af20b088d04cbbb6)) * **schemastore:** use `before_init` instead of `on_new_config` to load schema store ([#6427](https://github.com/LazyVim/LazyVim/issues/6427)) ([14d2a9b](https://github.com/LazyVim/LazyVim/commit/14d2a9baa1306bd0969112fcf8f69a11840cc5e6)) * **treesitter-main:** move exe check to config ([96316e5](https://github.com/LazyVim/LazyVim/commit/96316e5a69b4cc45311f5b7225e7d7bea1f977ee)) * **treesitter-main:** set vim.bo.indentexpr in FileType autocmd ([#6430](https://github.com/LazyVim/LazyVim/issues/6430)) ([b926e7d](https://github.com/LazyVim/LazyVim/commit/b926e7db417bc7b0e80feb778bed7924ffe8e85d)) * **vue:** `volar` -> `vua_ls`. Fixes [#6236](https://github.com/LazyVim/LazyVim/issues/6236). Closes [#6238](https://github.com/LazyVim/LazyVim/issues/6238). Closes [#6174](https://github.com/LazyVim/LazyVim/issues/6174) ([4a3b4a8](https://github.com/LazyVim/LazyVim/commit/4a3b4a80a89fe5a52d30fbe4afe85c152878ab1b)) ### Performance Improvements * **blink:** only enable lazydev in lua files ([4961b3d](https://github.com/LazyVim/LazyVim/commit/4961b3d4d4b2999816e978c3ea4ef7c320e4206d)) * **treesitter-main:** only enable highlighting for installed treesitter langs ([2f309fc](https://github.com/LazyVim/LazyVim/commit/2f309fc8b5bf93af25293c1e4688d409de718a36)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 55 +++++++++++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index d4bbf7f7..b87683f4 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.15.1" + ".": "15.0.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e2be0c4..0b1cf309 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,60 @@ # Changelog +## [15.0.0](https://github.com/LazyVim/LazyVim/compare/v14.15.1...v15.0.0) (2025-09-17) + + +### ⚠ BREAKING CHANGES + +* **treesitter:** migrate to `nvim-treesitter` **main** branch +* bump Neovim requirement to 0.11.2 +* LazyVim now requires Neovim >= 0.11 See #6421 for more info + +### Features + +* **blink:** enable blink cmdline completions ([011a35c](https://github.com/LazyVim/LazyVim/commit/011a35ccb810cbe5d25def9cc92271e8423feb74)) +* **blink:** enable cmdline completions ([ff7c12c](https://github.com/LazyVim/LazyVim/commit/ff7c12c48e23941ffd9a7bbe61857624929ae9da)) +* bump Neovim requirement to 0.11.2 ([cccfe70](https://github.com/LazyVim/LazyVim/commit/cccfe70ea4390c1915f67ab7d2893971fba3f3fa)) +* **extras:** added an experimental extra for the treesitter `main` branch ([5668ad7](https://github.com/LazyVim/LazyVim/commit/5668ad72ca806b3a7915bb7b35dcc5cccfe774f7)) +* LazyVim now requires Neovim >= 0.11 See [#6421](https://github.com/LazyVim/LazyVim/issues/6421) for more info ([e7ce65e](https://github.com/LazyVim/LazyVim/commit/e7ce65e1bb814f79ecb45bfeca934e997e0ee42c)) +* **lsp:** enable LSP folds when available ([5e2c4e6](https://github.com/LazyVim/LazyVim/commit/5e2c4e62f28a85e0b27d5c97ea92af8c1ab74cef)) +* **treesitter:** migrate to `nvim-treesitter` **main** branch ([5eac460](https://github.com/LazyVim/LazyVim/commit/5eac460c092103e5516bec345236853b9f35ec7c)) + + +### Bug Fixes + +* **blink:** make blink completions in cmdline behave more like regular cmdline ([f54fd7f](https://github.com/LazyVim/LazyVim/commit/f54fd7f751e902e824c3a4c9d212a0d18387d0b6)) +* **catppuccin:** follow renamed integration ([#6354](https://github.com/LazyVim/LazyVim/issues/6354)) ([02d0c9a](https://github.com/LazyVim/LazyVim/commit/02d0c9aebddb902d9c974a38bb44db9bae4eac6d)) +* **clangd:** file detection improvements ([#6436](https://github.com/LazyVim/LazyVim/issues/6436)) ([aab503f](https://github.com/LazyVim/LazyVim/commit/aab503fda63f34cff6bce229f73ea5209e8afaf0)) +* **clangd:** rewrite the root_dir function ([#6060](https://github.com/LazyVim/LazyVim/issues/6060)) ([167d39b](https://github.com/LazyVim/LazyVim/commit/167d39b2bef24024be1a48267e14cc6c82146462)) +* **eslint:** remove old 0.10 code ([919c9e5](https://github.com/LazyVim/LazyVim/commit/919c9e5d091f11b2892c56825249fc4a495d3e8f)) +* **extras:** disable blink path source in CopilotChat ([#5666](https://github.com/LazyVim/LazyVim/issues/5666)) ([#5754](https://github.com/LazyVim/LazyVim/issues/5754)) ([3aa2916](https://github.com/LazyVim/LazyVim/commit/3aa2916569df2664cb68e1c7c38882868f36f8d0)) +* **gitsigns:** use silent for gitsigns keymaps ([#5841](https://github.com/LazyVim/LazyVim/issues/5841)) ([6eed178](https://github.com/LazyVim/LazyVim/commit/6eed1781c185ea6d1f313aee60a7097448f473cb)) +* **grug-far:** add support for GrugFarWithin so it gets loaded by default ([#5772](https://github.com/LazyVim/LazyVim/issues/5772)) ([fd1b02a](https://github.com/LazyVim/LazyVim/commit/fd1b02ae5740dc651cc43291391084dbe7b1b3c4)) +* **harpoon:** keymaps for 1-9. Fixes [#6319](https://github.com/LazyVim/LazyVim/issues/6319) ([e2ba6bb](https://github.com/LazyVim/LazyVim/commit/e2ba6bb51107cbd076b53b49ed7be99fc2fa3991)) +* **jdtls:** root_dir ([271fecb](https://github.com/LazyVim/LazyVim/commit/271fecb067ec223a8eab90c1abd1162e9ebae5df)) +* **jdtls:** root_dir ([#6429](https://github.com/LazyVim/LazyVim/issues/6429)) ([c053921](https://github.com/LazyVim/LazyVim/commit/c05392186e9e540d4af169922c333b5baa583cbe)) +* **lang.haskell:** prevent Haskell extras from installing telescope.nvim ([#6419](https://github.com/LazyVim/LazyVim/issues/6419)) ([cc4a3e5](https://github.com/LazyVim/LazyVim/commit/cc4a3e556424dba784b41ec3bd92eeb7b62746bc)) +* **lsp:** buffer should be second arg for supports_method ([44ade7f](https://github.com/LazyVim/LazyVim/commit/44ade7fdea98a0356c64ff9edaf2534547b958bc)) +* **lspconfig:** remove all references to lspconfig. Closes [#6426](https://github.com/LazyVim/LazyVim/issues/6426) ([23b9cde](https://github.com/LazyVim/LazyVim/commit/23b9cdeb3471b655532e9884fa2dd36ee83062d5)) +* **lsp:** properly ambiguate denols vs vtsls ([2f75d9a](https://github.com/LazyVim/LazyVim/commit/2f75d9a90fc9cf43f7ba2365dbb745e5595fc02e)) +* **lsp:** properly register capabilities with new vim.lsp.config. Not needed for blink ([9fa832d](https://github.com/LazyVim/LazyVim/commit/9fa832dc95cb77a5551bbeff12b4520d8b7bdc2a)) +* **mason:** migrate to mason v2 ([#6053](https://github.com/LazyVim/LazyVim/issues/6053)) ([773f28b](https://github.com/LazyVim/LazyVim/commit/773f28b4912d5505a21da9686d56ab7cf41a9be7)) +* **mini:** update mini plugin references from echasnovski to nvim-mini ([#6374](https://github.com/LazyVim/LazyVim/issues/6374)) ([ae3aaf2](https://github.com/LazyVim/LazyVim/commit/ae3aaf2dd3a04eb5dbc5b1e34843558c85e45ac2)) +* **neo-tree:** import neo-tree Extra before edgy Extra ([#5763](https://github.com/LazyVim/LazyVim/issues/5763)) ([848dd31](https://github.com/LazyVim/LazyVim/commit/848dd3132af50f6d211d0c07166ea7c1a4259088)) +* **ocaml:** use `root_dir` instead of `root_markers` for globs support ([#6428](https://github.com/LazyVim/LazyVim/issues/6428)) ([44cc063](https://github.com/LazyVim/LazyVim/commit/44cc0635bc3d2ccc55eb76bc7668092befcf0536)) +* **refactoring:** update funcs to return, add `expr=true`, operator mode ([#5882](https://github.com/LazyVim/LazyVim/issues/5882)) ([6e1de74](https://github.com/LazyVim/LazyVim/commit/6e1de74597fa07ea805920da370f9d998740bc5e)) +* remove 0.9 compat ([3516ae7](https://github.com/LazyVim/LazyVim/commit/3516ae736a333185f6f17b70af20b088d04cbbb6)) +* **schemastore:** use `before_init` instead of `on_new_config` to load schema store ([#6427](https://github.com/LazyVim/LazyVim/issues/6427)) ([14d2a9b](https://github.com/LazyVim/LazyVim/commit/14d2a9baa1306bd0969112fcf8f69a11840cc5e6)) +* **treesitter-main:** move exe check to config ([96316e5](https://github.com/LazyVim/LazyVim/commit/96316e5a69b4cc45311f5b7225e7d7bea1f977ee)) +* **treesitter-main:** set vim.bo.indentexpr in FileType autocmd ([#6430](https://github.com/LazyVim/LazyVim/issues/6430)) ([b926e7d](https://github.com/LazyVim/LazyVim/commit/b926e7db417bc7b0e80feb778bed7924ffe8e85d)) +* **vue:** `volar` -> `vua_ls`. Fixes [#6236](https://github.com/LazyVim/LazyVim/issues/6236). Closes [#6238](https://github.com/LazyVim/LazyVim/issues/6238). Closes [#6174](https://github.com/LazyVim/LazyVim/issues/6174) ([4a3b4a8](https://github.com/LazyVim/LazyVim/commit/4a3b4a80a89fe5a52d30fbe4afe85c152878ab1b)) + + +### Performance Improvements + +* **blink:** only enable lazydev in lua files ([4961b3d](https://github.com/LazyVim/LazyVim/commit/4961b3d4d4b2999816e978c3ea4ef7c320e4206d)) +* **treesitter-main:** only enable highlighting for installed treesitter langs ([2f309fc](https://github.com/LazyVim/LazyVim/commit/2f309fc8b5bf93af25293c1e4688d409de718a36)) + ## [14.15.1](https://github.com/LazyVim/LazyVim/compare/v14.15.0...v14.15.1) (2025-09-15) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 9e0903c2..931ef9ff 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.15.1" -- x-release-please-version +M.version = "15.0.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 2d56d3b37c275890a403845c00b5c8d38cb387e6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 16:54:34 +0200 Subject: [PATCH 059/103] fix(treesitter): TS update during inital build --- lua/lazyvim/plugins/treesitter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 5462149a..c9a6e094 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -13,7 +13,7 @@ return { LazyVim.error("Please restart Neovim and run `:TSUpdate` to use the `nvim-treesitter` **main** branch.") return end - vim.cmd.TSUpdate() + TS.update(nil, { summary = true }) end, lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline event = { "LazyFile", "VeryLazy" }, From 9e58f05aae1bf521ce1ff5b6b3bd8c5bf88a6488 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 16:59:13 +0200 Subject: [PATCH 060/103] chore(main): release 15.0.1 (#6438) :robot: I have created a release *beep* *boop* --- ## [15.0.1](https://github.com/LazyVim/LazyVim/compare/v15.0.0...v15.0.1) (2025-09-17) ### Bug Fixes * **treesitter:** TS update during inital build ([2d56d3b](https://github.com/LazyVim/LazyVim/commit/2d56d3b37c275890a403845c00b5c8d38cb387e6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index b87683f4..d09e9fe9 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.0.0" + ".": "15.0.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b1cf309..2aa0a8ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [15.0.1](https://github.com/LazyVim/LazyVim/compare/v15.0.0...v15.0.1) (2025-09-17) + + +### Bug Fixes + +* **treesitter:** TS update during inital build ([2d56d3b](https://github.com/LazyVim/LazyVim/commit/2d56d3b37c275890a403845c00b5c8d38cb387e6)) + ## [15.0.0](https://github.com/LazyVim/LazyVim/compare/v14.15.1...v15.0.0) (2025-09-17) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 931ef9ff..4524969d 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.0.0" -- x-release-please-version +M.version = "15.0.1" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From ed3aa74c107de7dc3e06367ce4afb20056710441 Mon Sep 17 00:00:00 2001 From: Zhizhen He Date: Wed, 17 Sep 2025 23:16:31 +0800 Subject: [PATCH 061/103] fix(python): remove the wrapping `settings` key from `setup()` options (#6069) ## Description Remove the wrapping `settings` key from `setup()` options. ## Related Issue(s) ## Screenshots image ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/python.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/python.lua b/lua/lazyvim/plugins/extras/lang/python.lua index 3298f6dd..a02ded1f 100644 --- a/lua/lazyvim/plugins/extras/lang/python.lua +++ b/lua/lazyvim/plugins/extras/lang/python.lua @@ -116,10 +116,8 @@ return { "linux-cultist/venv-selector.nvim", cmd = "VenvSelect", opts = { - settings = { - options = { - notify_user_on_venv_activation = true, - }, + options = { + notify_user_on_venv_activation = true, }, }, -- Call config for Python files and load the cached venv automatically From a6b38de763addf2d22e8a43a1e679cc855dc376d Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 22:46:14 +0200 Subject: [PATCH 062/103] fix(treesitter): indentexpr/foldexpr now work as intended and override ftplugin settings. Fixes #6447 --- lua/lazyvim/config/options.lua | 2 +- lua/lazyvim/plugins/treesitter.lua | 9 +++++++++ lua/lazyvim/util/treesitter.lua | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index f71f96df..2872d2a4 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -72,7 +72,7 @@ opt.foldexpr = "v:lua.LazyVim.treesitter.foldexpr()" -- treesitter folds opt.foldlevel = 99 opt.foldmethod = "expr" opt.foldtext = "" -opt.formatexpr = "v:lua.require'lazyvim.util'.format.formatexpr()" +opt.formatexpr = "v:lua.LazyVim.format.formatexpr()" opt.formatoptions = "jcroqlnt" -- tcqj opt.grepformat = "%f:%l:%c:%m" opt.grepprg = "rg --vimgrep" diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index c9a6e094..327c13be 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -80,9 +80,18 @@ return { -- treesitter highlighting vim.api.nvim_create_autocmd("FileType", { + group = vim.api.nvim_create_augroup("lazyvim_treesitter", { clear = true }), callback = function(ev) if LazyVim.treesitter.have(ev.match) then pcall(vim.treesitter.start) + + -- check if ftplugins changed foldexpr/indentexpr + for _, option in ipairs({ "foldexpr", "indentexpr" }) do + local expr = "v:lua.LazyVim.treesitter." .. option .. "()" + if vim.opt_global[option]:get() == expr then + vim.opt_local[option] = expr + end + end end end, }) diff --git a/lua/lazyvim/util/treesitter.lua b/lua/lazyvim/util/treesitter.lua index 84e279ce..07e0e5eb 100644 --- a/lua/lazyvim/util/treesitter.lua +++ b/lua/lazyvim/util/treesitter.lua @@ -22,12 +22,12 @@ end function M.foldexpr() local buf = vim.api.nvim_get_current_buf() - return M.have(vim.b[buf].filetype) and vim.treesitter.foldexpr() or "0" + return M.have(vim.bo[buf].filetype) and vim.treesitter.foldexpr() or "0" end function M.indentexpr() local buf = vim.api.nvim_get_current_buf() - return M.have(vim.b[buf].filetype) and require("nvim-treesitter").indentexpr() or -1 + return M.have(vim.bo[buf].filetype) and require("nvim-treesitter").indentexpr() or -1 end return M From 1c14d858e54e9bfed30007641135e555716519e8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 22:50:09 +0200 Subject: [PATCH 063/103] chore(main): release 15.0.2 (#6439) :robot: I have created a release *beep* *boop* --- ## [15.0.2](https://github.com/LazyVim/LazyVim/compare/v15.0.1...v15.0.2) (2025-09-17) ### Bug Fixes * **python:** remove the wrapping `settings` key from `setup()` options ([#6069](https://github.com/LazyVim/LazyVim/issues/6069)) ([ed3aa74](https://github.com/LazyVim/LazyVim/commit/ed3aa74c107de7dc3e06367ce4afb20056710441)) * **treesitter:** indentexpr/foldexpr now work as intended and override ftplugin settings. Fixes [#6447](https://github.com/LazyVim/LazyVim/issues/6447) ([a6b38de](https://github.com/LazyVim/LazyVim/commit/a6b38de763addf2d22e8a43a1e679cc855dc376d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index d09e9fe9..3cc5db92 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.0.1" + ".": "15.0.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 2aa0a8ad..541bf093 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [15.0.2](https://github.com/LazyVim/LazyVim/compare/v15.0.1...v15.0.2) (2025-09-17) + + +### Bug Fixes + +* **python:** remove the wrapping `settings` key from `setup()` options ([#6069](https://github.com/LazyVim/LazyVim/issues/6069)) ([ed3aa74](https://github.com/LazyVim/LazyVim/commit/ed3aa74c107de7dc3e06367ce4afb20056710441)) +* **treesitter:** indentexpr/foldexpr now work as intended and override ftplugin settings. Fixes [#6447](https://github.com/LazyVim/LazyVim/issues/6447) ([a6b38de](https://github.com/LazyVim/LazyVim/commit/a6b38de763addf2d22e8a43a1e679cc855dc376d)) + ## [15.0.1](https://github.com/LazyVim/LazyVim/compare/v15.0.0...v15.0.1) (2025-09-17) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 4524969d..ae0b9bda 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.0.1" -- x-release-please-version +M.version = "15.0.2" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From c28f599d4f5d175f3d259a621c4e7b5d0b2a0759 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 23:39:19 +0200 Subject: [PATCH 064/103] fix(treesitter): properly update installedd languages after setup --- lua/lazyvim/plugins/treesitter.lua | 2 ++ lua/lazyvim/util/treesitter.lua | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 327c13be..b36c24d3 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -68,6 +68,8 @@ return { -- setup treesitter TS.setup(opts) + LazyVim.treesitter.get_installed(true) -- initialize the installed langs + -- install missing parsers local install = vim.tbl_filter(function(lang) return not LazyVim.treesitter.have(lang) diff --git a/lua/lazyvim/util/treesitter.lua b/lua/lazyvim/util/treesitter.lua index 07e0e5eb..bf7c12f8 100644 --- a/lua/lazyvim/util/treesitter.lua +++ b/lua/lazyvim/util/treesitter.lua @@ -3,15 +3,15 @@ local M = {} M._installed = nil ---@type table? ----@param force boolean? -function M.get_installed(force) - if not M._installed or force then +---@param update boolean? +function M.get_installed(update) + if update then M._installed = {} for _, lang in ipairs(require("nvim-treesitter").get_installed("parsers")) do M._installed[lang] = lang end end - return M._installed + return M._installed or {} end ---@param ft string From bd1f523df58edd61eef10643ef9c42f9191ce617 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 23:41:10 +0200 Subject: [PATCH 065/103] chore(main): release 15.0.3 (#6448) :robot: I have created a release *beep* *boop* --- ## [15.0.3](https://github.com/LazyVim/LazyVim/compare/v15.0.2...v15.0.3) (2025-09-17) ### Bug Fixes * **treesitter:** properly update installedd languages after setup ([c28f599](https://github.com/LazyVim/LazyVim/commit/c28f599d4f5d175f3d259a621c4e7b5d0b2a0759)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 3cc5db92..fbbae712 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.0.2" + ".": "15.0.3" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 541bf093..b6be3e05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [15.0.3](https://github.com/LazyVim/LazyVim/compare/v15.0.2...v15.0.3) (2025-09-17) + + +### Bug Fixes + +* **treesitter:** properly update installedd languages after setup ([c28f599](https://github.com/LazyVim/LazyVim/commit/c28f599d4f5d175f3d259a621c4e7b5d0b2a0759)) + ## [15.0.2](https://github.com/LazyVim/LazyVim/compare/v15.0.1...v15.0.2) (2025-09-17) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index ae0b9bda..baad77a5 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.0.2" -- x-release-please-version +M.version = "15.0.3" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 5bf237820d7938b1b6490164fbd75e4117d341c1 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Sep 2025 09:46:49 +0200 Subject: [PATCH 066/103] fix(snacks): safe wrapper around snacks statuscolumn to prevent errors when LazyVim is still installing --- lua/lazyvim/config/options.lua | 2 +- lua/lazyvim/util/init.lua | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index 2872d2a4..618d4e7e 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -104,7 +104,7 @@ opt.spelllang = { "en" } opt.splitbelow = true -- Put new windows below current opt.splitkeep = "screen" opt.splitright = true -- Put new windows right of current -opt.statuscolumn = [[%!v:lua.require'snacks.statuscolumn'.get()]] +opt.statuscolumn = [[%!v:lua.LazyVim.statuscolumn()]] opt.tabstop = 2 -- Number of spaces tabs count for opt.termguicolors = true -- True color support opt.timeoutlen = vim.g.vscode and 1000 or 300 -- Lower than default (1000) to quickly trigger which-key diff --git a/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index 7561b385..44a135ad 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -299,4 +299,9 @@ function M.memoize(fn) end end +-- Safe wrapper around snacks to prevent errors when LazyVim is still installing +function M.statuscolumn() + return package.loaded.snacks and require("snacks.statuscolumn").get() or "" +end + return M From b93303d2339b1117171780cebed1d710fd3805d5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Sep 2025 09:48:43 +0200 Subject: [PATCH 067/103] feat(treesitter): refactored setting up treesitter indent/highlight/folds --- lua/lazyvim/config/options.lua | 4 +--- lua/lazyvim/plugins/lsp/init.lua | 1 + lua/lazyvim/plugins/treesitter.lua | 30 ++++++++++++++++++++---------- lua/lazyvim/util/treesitter.lua | 19 +++++++++++-------- 4 files changed, 33 insertions(+), 21 deletions(-) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index 618d4e7e..2ae1b38d 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -68,9 +68,8 @@ opt.fillchars = { diff = "╱", eob = " ", } -opt.foldexpr = "v:lua.LazyVim.treesitter.foldexpr()" -- treesitter folds opt.foldlevel = 99 -opt.foldmethod = "expr" +opt.foldmethod = "indent" opt.foldtext = "" opt.formatexpr = "v:lua.LazyVim.format.formatexpr()" opt.formatoptions = "jcroqlnt" -- tcqj @@ -78,7 +77,6 @@ opt.grepformat = "%f:%l:%c:%m" opt.grepprg = "rg --vimgrep" opt.ignorecase = true -- Ignore case opt.inccommand = "nosplit" -- preview incremental substitute -opt.indentexpr = "v:lua.LazyVim.treesitter.indentexpr()" -- treesitter indents opt.jumpoptions = "view" opt.laststatus = 3 -- global statusline opt.linebreak = true -- Wrap lines at convenient points diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 00a698fc..1984c31b 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -148,6 +148,7 @@ return { LazyVim.lsp.on_supports_method("textDocument/foldingRange", function(client, buffer) local win = vim.api.nvim_get_current_win() vim.wo[win][0].foldexpr = "v:lua.vim.lsp.foldexpr()" + vim.wo[win][0].foldmethod = "expr" end) end diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index b36c24d3..bb842763 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -22,6 +22,9 @@ return { ---@class lazyvim.TSConfig: TSConfig opts = { -- LazyVim config for treesitter + indent = { enable = true }, + highlight = { enable = true }, + folds = { enable = true }, ensure_installed = { "bash", "c", @@ -80,20 +83,27 @@ return { end) end - -- treesitter highlighting vim.api.nvim_create_autocmd("FileType", { group = vim.api.nvim_create_augroup("lazyvim_treesitter", { clear = true }), callback = function(ev) - if LazyVim.treesitter.have(ev.match) then - pcall(vim.treesitter.start) + if not LazyVim.treesitter.have(ev.match) then + return + end - -- check if ftplugins changed foldexpr/indentexpr - for _, option in ipairs({ "foldexpr", "indentexpr" }) do - local expr = "v:lua.LazyVim.treesitter." .. option .. "()" - if vim.opt_global[option]:get() == expr then - vim.opt_local[option] = expr - end - end + -- highlighting + if vim.tbl_get(opts, "highlight", "enable") ~= false then + pcall(vim.treesitter.start) + end + + -- indents + if vim.tbl_get(opts, "indent", "enable") ~= false then + vim.bo[ev.buf].indentexpr = "v:lua.LazyVim.treesitter.indentexpr()" + end + + -- folds + if vim.tbl_get(opts, "folds", "enable") ~= false then + vim.wo.foldmethod = "expr" + vim.wo.foldexpr = "v:lua.LazyVim.treesitter.foldexpr()" end end, }) diff --git a/lua/lazyvim/util/treesitter.lua b/lua/lazyvim/util/treesitter.lua index bf7c12f8..73e925fc 100644 --- a/lua/lazyvim/util/treesitter.lua +++ b/lua/lazyvim/util/treesitter.lua @@ -14,20 +14,23 @@ function M.get_installed(update) return M._installed or {} end ----@param ft string -function M.have(ft) - local lang = vim.treesitter.language.get_lang(ft) - return lang and M.get_installed()[lang] +---@param what string|number|nil +---@overload fun(buf?:number):boolean +---@overload fun(ft:string):boolean +---@return boolean +function M.have(what) + what = what or vim.api.nvim_get_current_buf() + what = type(what) == "number" and vim.bo[what].filetype or what --[[@as string]] + local lang = vim.treesitter.language.get_lang(what) + return lang ~= nil and M.get_installed()[lang] ~= nil end function M.foldexpr() - local buf = vim.api.nvim_get_current_buf() - return M.have(vim.bo[buf].filetype) and vim.treesitter.foldexpr() or "0" + return M.have() and vim.treesitter.foldexpr() or "0" end function M.indentexpr() - local buf = vim.api.nvim_get_current_buf() - return M.have(vim.bo[buf].filetype) and require("nvim-treesitter").indentexpr() or -1 + return M.have() and require("nvim-treesitter").indentexpr() or -1 end return M From 725d048e009b866425b2a0cc620ba2c413e8b65f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Sep 2025 09:49:20 +0200 Subject: [PATCH 068/103] feat(treesitter): automatically install and use mason's tree-sitter-cli if not installed on system --- lua/lazyvim/plugins/treesitter.lua | 16 +++++----- lua/lazyvim/util/treesitter.lua | 47 ++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 9 deletions(-) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index bb842763..a7ef7ed8 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -13,7 +13,9 @@ return { LazyVim.error("Please restart Neovim and run `:TSUpdate` to use the `nvim-treesitter` **main** branch.") return end - TS.update(nil, { summary = true }) + LazyVim.treesitter.ensure_treesitter_cli(function() + TS.update(nil, { summary = true }) + end) end, lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline event = { "LazyFile", "VeryLazy" }, @@ -59,18 +61,12 @@ return { -- some quick sanity checks if not TS.get_installed then return LazyVim.error("Please use `:Lazy` and update `nvim-treesitter`") - elseif vim.fn.executable("tree-sitter") == 0 then - return LazyVim.error({ - "**treesitter-main** requires the `tree-sitter` CLI executable to be installed.", - "Run `:checkhealth nvim-treesitter` for more information.", - }) elseif type(opts.ensure_installed) ~= "table" then return LazyVim.error("`nvim-treesitter` opts.ensure_installed must be a table") end -- setup treesitter TS.setup(opts) - LazyVim.treesitter.get_installed(true) -- initialize the installed langs -- install missing parsers @@ -78,8 +74,10 @@ return { return not LazyVim.treesitter.have(lang) end, opts.ensure_installed or {}) if #install > 0 then - TS.install(install, { summary = true }):await(function() - LazyVim.treesitter.get_installed(true) -- refresh the installed langs + LazyVim.treesitter.ensure_treesitter_cli(function() + TS.install(install, { summary = true }):await(function() + LazyVim.treesitter.get_installed(true) -- refresh the installed langs + end) end) end diff --git a/lua/lazyvim/util/treesitter.lua b/lua/lazyvim/util/treesitter.lua index 73e925fc..5df6aa53 100644 --- a/lua/lazyvim/util/treesitter.lua +++ b/lua/lazyvim/util/treesitter.lua @@ -33,4 +33,51 @@ function M.indentexpr() return M.have() and require("nvim-treesitter").indentexpr() or -1 end +---@param cb fun() +function M.ensure_treesitter_cli(cb) + if vim.fn.executable("tree-sitter") == 1 then + return cb() + end + + ---@param msg? string + local function fail(msg) + return LazyVim.error({ + "**treesitter-nvim** `main` requires the `tree-sitter` CLI executable to be installed.", + "Please install it manually from https://github.com/tree-sitter/tree-sitter/tree/master/crates/cli or", + "use your system package manager.", + "Run `:checkhealth nvim-treesitter` for more information.", + msg, + }) + end + + -- try installing with mason + if not pcall(require, "mason") then + return fail("`mason.nvim` is disabled in your config, so we cannot install it automatically.") + end + + -- check again since we might have installed it already + if vim.fn.executable("tree-sitter") == 1 then + return cb() + end + + local mr = require("mason-registry") + mr.refresh(function() + local p = mr.get_package("tree-sitter-cli") + if not p:is_installed() then + LazyVim.info("Installing `tree-sitter-cli` with `mason.nvim`...") + p:install( + nil, + vim.schedule_wrap(function(success) + if success then + LazyVim.info("Installed `tree-sitter-cli` with `mason.nvim`.") + cb() + else + fail("Failed to install `tree-sitter-cli` with `mason.nvim`.") + end + end) + ) + end + end) +end + return M From 1dece3be15bdd2e95e6997017b050fb08f01d143 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Thu, 18 Sep 2025 07:51:02 +0000 Subject: [PATCH 069/103] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 9f4b59fd..5c3e670d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 17 +*LazyVim.txt* For Neovim Last change: 2025 September 18 ============================================================================== Table of Contents *LazyVim-table-of-contents* From a467ce074f00edd1d2667e55afe72904c5aeaf24 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Sep 2025 10:03:59 +0200 Subject: [PATCH 070/103] chore(main): release 15.1.0 (#6452) :robot: I have created a release *beep* *boop* --- ## [15.1.0](https://github.com/LazyVim/LazyVim/compare/v15.0.3...v15.1.0) (2025-09-18) ### Features * **treesitter:** automatically install and use mason's tree-sitter-cli if not installed on system ([725d048](https://github.com/LazyVim/LazyVim/commit/725d048e009b866425b2a0cc620ba2c413e8b65f)) * **treesitter:** refactored setting up treesitter indent/highlight/folds ([b93303d](https://github.com/LazyVim/LazyVim/commit/b93303d2339b1117171780cebed1d710fd3805d5)) ### Bug Fixes * **snacks:** safe wrapper around snacks statuscolumn to prevent errors when LazyVim is still installing ([5bf2378](https://github.com/LazyVim/LazyVim/commit/5bf237820d7938b1b6490164fbd75e4117d341c1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index fbbae712..9da34491 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.0.3" + ".": "15.1.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index b6be3e05..7b8723e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [15.1.0](https://github.com/LazyVim/LazyVim/compare/v15.0.3...v15.1.0) (2025-09-18) + + +### Features + +* **treesitter:** automatically install and use mason's tree-sitter-cli if not installed on system ([725d048](https://github.com/LazyVim/LazyVim/commit/725d048e009b866425b2a0cc620ba2c413e8b65f)) +* **treesitter:** refactored setting up treesitter indent/highlight/folds ([b93303d](https://github.com/LazyVim/LazyVim/commit/b93303d2339b1117171780cebed1d710fd3805d5)) + + +### Bug Fixes + +* **snacks:** safe wrapper around snacks statuscolumn to prevent errors when LazyVim is still installing ([5bf2378](https://github.com/LazyVim/LazyVim/commit/5bf237820d7938b1b6490164fbd75e4117d341c1)) + ## [15.0.3](https://github.com/LazyVim/LazyVim/compare/v15.0.2...v15.0.3) (2025-09-17) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index baad77a5..d12f2ac0 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.0.3" -- x-release-please-version +M.version = "15.1.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 36b41911ab90fe19505af306a31a5a699342d3c3 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Sep 2025 13:06:46 +0200 Subject: [PATCH 071/103] fix(lspconfig): remove all usage of `lspconfig` --- lua/lazyvim/plugins/extras/lang/java.lua | 4 +++- lua/lazyvim/plugins/extras/lang/ocaml.lua | 19 +++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index e4926521..d4eb5f6e 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -91,7 +91,9 @@ return { table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar)) end return { - root_dir = require("lspconfig.util").root_pattern(vim.lsp.config.jdtls.root_markers), + root_dir = function(path) + return vim.fs.root(path, vim.lsp.config.jdtls.root_markers) + end, -- How to find the project name for a given root dir. project_name = function(root_dir) diff --git a/lua/lazyvim/plugins/extras/lang/ocaml.lua b/lua/lazyvim/plugins/extras/lang/ocaml.lua index 0e733a4a..631223d4 100644 --- a/lua/lazyvim/plugins/extras/lang/ocaml.lua +++ b/lua/lazyvim/plugins/extras/lang/ocaml.lua @@ -26,12 +26,19 @@ return { "reason", "dune", }, - root_dir = function(bufnr, on_dir) - local util = require("lspconfig.util") - local fname = vim.api.nvim_buf_get_name(bufnr) - --stylua: ignore - on_dir(util.root_pattern("*.opam", "esy.json", "package.json", ".git", "dune-project", "dune-workspace", "*.ml")( fname)) - end, + root_markers = { + function(name) + return name:match(".*%.opam$") + end, + "esy.json", + "package.json", + ".git", + "dune-project", + "dune-workspace", + function(name) + return name:match(".*%.ml$") + end, + }, }, }, }, From 75a3809e15a0ecff9adc46c6cd3aaac51d99b561 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Sep 2025 13:52:07 +0200 Subject: [PATCH 072/103] fix(lsp): schedule_wrap setting up LSPs to work around root cause of #6456. Fixes #6456 --- lua/lazyvim/plugins/lsp/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 1984c31b..95b7385c 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -2,7 +2,7 @@ return { -- lspconfig { "neovim/nvim-lspconfig", - event = { "BufReadPre", "BufNewFile", "BufWritePre" }, + event = "LazyFile", dependencies = { "mason.nvim", { "mason-org/mason-lspconfig.nvim", config = function() end }, @@ -118,7 +118,7 @@ return { return ret end, ---@param opts PluginLspOpts - config = function(_, opts) + config = vim.schedule_wrap(function(_, opts) -- setup autoformat LazyVim.format.register(LazyVim.lsp.formatter()) @@ -256,7 +256,7 @@ return { resolve("denols") resolve("vtsls") end - end, + end), }, -- cmdline tools and lsp servers From cfac3c9a85526ad7406f9b246097a1ec4fa1a2c3 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Sep 2025 14:07:49 +0200 Subject: [PATCH 073/103] fix(core): check for outdated nightly. See #6458 --- lua/lazyvim/plugins/init.lua | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index 7797b047..4ba9b36d 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -1,9 +1,20 @@ +local fail = nil if vim.fn.has("nvim-0.11.2") == 0 then - vim.api.nvim_echo({ + fail = { { "LazyVim requires Neovim >= 0.11.2\n", "ErrorMsg" }, { "For more info, see: https://github.com/LazyVim/LazyVim/issues/6421\n", "Comment" }, { "Press any key to exit", "MoreMsg" }, - }, true, {}) + } +elseif vim.fn.has("nvim-0.12") == 1 and not vim.lsp.is_enabled then + fail = { + { "LazyVim requires Neovim >= 0.11.2 or a recent Nightly\n", "ErrorMsg" }, + { "Your nightly is too old, please update to a more recent version.\n", "Comment" }, + { "Press any key to exit", "MoreMsg" }, + } +end + +if fail then + vim.api.nvim_echo(fail, true, {}) vim.fn.getchar() vim.cmd([[quit]]) return {} From 3a743f7f853bd90894259cd93432d77c688774b4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Sep 2025 14:09:58 +0200 Subject: [PATCH 074/103] chore(main): release 15.1.1 (#6457) :robot: I have created a release *beep* *boop* --- ## [15.1.1](https://github.com/LazyVim/LazyVim/compare/v15.1.0...v15.1.1) (2025-09-18) ### Bug Fixes * **core:** check for outdated nightly. See [#6458](https://github.com/LazyVim/LazyVim/issues/6458) ([cfac3c9](https://github.com/LazyVim/LazyVim/commit/cfac3c9a85526ad7406f9b246097a1ec4fa1a2c3)) * **lspconfig:** remove all usage of `lspconfig` ([36b4191](https://github.com/LazyVim/LazyVim/commit/36b41911ab90fe19505af306a31a5a699342d3c3)) * **lsp:** schedule_wrap setting up LSPs to work around root cause of [#6456](https://github.com/LazyVim/LazyVim/issues/6456). Fixes [#6456](https://github.com/LazyVim/LazyVim/issues/6456) ([75a3809](https://github.com/LazyVim/LazyVim/commit/75a3809e15a0ecff9adc46c6cd3aaac51d99b561)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 9da34491..8e00e87c 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.1.0" + ".": "15.1.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b8723e8..c1b5e9ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [15.1.1](https://github.com/LazyVim/LazyVim/compare/v15.1.0...v15.1.1) (2025-09-18) + + +### Bug Fixes + +* **core:** check for outdated nightly. See [#6458](https://github.com/LazyVim/LazyVim/issues/6458) ([cfac3c9](https://github.com/LazyVim/LazyVim/commit/cfac3c9a85526ad7406f9b246097a1ec4fa1a2c3)) +* **lspconfig:** remove all usage of `lspconfig` ([36b4191](https://github.com/LazyVim/LazyVim/commit/36b41911ab90fe19505af306a31a5a699342d3c3)) +* **lsp:** schedule_wrap setting up LSPs to work around root cause of [#6456](https://github.com/LazyVim/LazyVim/issues/6456). Fixes [#6456](https://github.com/LazyVim/LazyVim/issues/6456) ([75a3809](https://github.com/LazyVim/LazyVim/commit/75a3809e15a0ecff9adc46c6cd3aaac51d99b561)) + ## [15.1.0](https://github.com/LazyVim/LazyVim/compare/v15.0.3...v15.1.0) (2025-09-18) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index d12f2ac0..0df3885b 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.1.0" -- x-release-please-version +M.version = "15.1.1" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From ccbaf55c2f8bc691f8f64fe40ce00a1abda4fbac Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Sep 2025 22:19:03 +0200 Subject: [PATCH 075/103] feat(options): don't overwrite indentexpr/foldexpr/foldmethod when set by plugins. Fixes #6464 --- lua/lazyvim/plugins/lsp/init.lua | 6 ++-- lua/lazyvim/plugins/treesitter.lua | 7 +++-- lua/lazyvim/util/init.lua | 47 ++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 6 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 95b7385c..bc6a7f46 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -146,9 +146,9 @@ return { -- folds if opts.folds.enabled then LazyVim.lsp.on_supports_method("textDocument/foldingRange", function(client, buffer) - local win = vim.api.nvim_get_current_win() - vim.wo[win][0].foldexpr = "v:lua.vim.lsp.foldexpr()" - vim.wo[win][0].foldmethod = "expr" + if LazyVim.set_default("foldmethod", "expr") then + LazyVim.set_default("foldexpr", "v:lua.vim.lsp.foldexpr()") + end end) end diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index a7ef7ed8..751a72f3 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -95,13 +95,14 @@ return { -- indents if vim.tbl_get(opts, "indent", "enable") ~= false then - vim.bo[ev.buf].indentexpr = "v:lua.LazyVim.treesitter.indentexpr()" + LazyVim.set_default("indentexpr", "v:lua.LazyVim.treesitter.indentexpr()") end -- folds if vim.tbl_get(opts, "folds", "enable") ~= false then - vim.wo.foldmethod = "expr" - vim.wo.foldexpr = "v:lua.LazyVim.treesitter.foldexpr()" + if LazyVim.set_default("foldmethod", "expr") then + LazyVim.set_default("foldexpr", "v:lua.LazyVim.treesitter.foldexpr()") + end end end, }) diff --git a/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index 44a135ad..a3349c8a 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -304,4 +304,51 @@ function M.statuscolumn() return package.loaded.snacks and require("snacks.statuscolumn").get() or "" end +local _defaults = {} ---@type table + +-- Determines whether it's safe to set an option to a default value. +-- +-- It will only set the option if: +-- * it is the same as the global value +-- * it is the same as a previously set default value +-- * it was last set by a script in $VIMRUNTIME +---@param option string +---@param value string|number|boolean +---@return boolean was_set +function M.set_default(option, value) + local key = ("%s=%s"):format(option, value) + _defaults[key] = true + + if not _defaults[key] then + local l = vim.api.nvim_get_option_value(option, { scope = "local" }) + local g = vim.api.nvim_get_option_value(option, { scope = "global" }) + + if l ~= g then + -- Option changed, so check if it was set by an ft plugin + local info = vim.api.nvim_get_option_info2(option, { scope = "local" }) + ---@param e vim.fn.getscriptinfo.ret + local scriptinfo = vim.tbl_filter(function(e) + return e.sid == info.last_set_sid + end, vim.fn.getscriptinfo()) + local by_rtp = #scriptinfo == 1 and vim.startswith(scriptinfo[1].name, vim.fn.expand("$VIMRUNTIME")) + if not by_rtp then + if vim.g.lazyvim_debug_set_default then + LazyVim.warn( + ("Not setting option `%s` to `%s` because it was changed by a filetype plugin."):format(option, value), + { title = "LazyVim", once = true } + ) + end + return false + end + end + end + + if vim.g.lazyvim_debug_set_default then + LazyVim.info(("Setting option `%s` to `%s`"):format(option, value), { title = "LazyVim", once = true }) + end + + vim.api.nvim_set_option_value(option, value, { scope = "local" }) + return true +end + return M From 2401d5fca6f2a2fcaca4f9c4c84c4b713c602352 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Sep 2025 23:51:32 +0200 Subject: [PATCH 076/103] fix(options): set_default option --- lua/lazyvim/util/init.lua | 43 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index a3349c8a..ac3ffcec 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -310,36 +310,35 @@ local _defaults = {} ---@type table -- -- It will only set the option if: -- * it is the same as the global value --- * it is the same as a previously set default value +-- * it's current value is a default value -- * it was last set by a script in $VIMRUNTIME ---@param option string ---@param value string|number|boolean ---@return boolean was_set function M.set_default(option, value) - local key = ("%s=%s"):format(option, value) - _defaults[key] = true + local l = vim.api.nvim_get_option_value(option, { scope = "local" }) + local g = vim.api.nvim_get_option_value(option, { scope = "global" }) - if not _defaults[key] then - local l = vim.api.nvim_get_option_value(option, { scope = "local" }) - local g = vim.api.nvim_get_option_value(option, { scope = "global" }) + _defaults[("%s=%s"):format(option, value)] = true + local key = ("%s=%s"):format(option, l) - if l ~= g then - -- Option changed, so check if it was set by an ft plugin - local info = vim.api.nvim_get_option_info2(option, { scope = "local" }) - ---@param e vim.fn.getscriptinfo.ret - local scriptinfo = vim.tbl_filter(function(e) - return e.sid == info.last_set_sid - end, vim.fn.getscriptinfo()) - local by_rtp = #scriptinfo == 1 and vim.startswith(scriptinfo[1].name, vim.fn.expand("$VIMRUNTIME")) - if not by_rtp then - if vim.g.lazyvim_debug_set_default then - LazyVim.warn( - ("Not setting option `%s` to `%s` because it was changed by a filetype plugin."):format(option, value), - { title = "LazyVim", once = true } - ) - end - return false + if l ~= g and not _defaults[key] then + -- Option does not match global and is not a default value + -- Check if it was set by a script in $VIMRUNTIME + local info = vim.api.nvim_get_option_info2(option, { scope = "local" }) + ---@param e vim.fn.getscriptinfo.ret + local scriptinfo = vim.tbl_filter(function(e) + return e.sid == info.last_set_sid + end, vim.fn.getscriptinfo()) + local by_rtp = #scriptinfo == 1 and vim.startswith(scriptinfo[1].name, vim.fn.expand("$VIMRUNTIME")) + if not by_rtp then + if vim.g.lazyvim_debug_set_default then + LazyVim.warn( + ("Not setting option `%s` to `%s` because it was changed by a filetype plugin."):format(option, value), + { title = "LazyVim", once = true } + ) end + return false end end From 3ca7b47365c85a07047e48cad450feff66c8bdd6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 19 Sep 2025 08:11:38 +0200 Subject: [PATCH 077/103] feat(core): relax hard requirement for `vim.lsp.is_enabled`. Show warning instead --- lua/lazyvim/plugins/init.lua | 23 ++++++++++------------- lua/lazyvim/plugins/lsp/init.lua | 2 +- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index 4ba9b36d..80394371 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -1,23 +1,20 @@ -local fail = nil if vim.fn.has("nvim-0.11.2") == 0 then - fail = { + vim.api.nvim_echo({ { "LazyVim requires Neovim >= 0.11.2\n", "ErrorMsg" }, { "For more info, see: https://github.com/LazyVim/LazyVim/issues/6421\n", "Comment" }, { "Press any key to exit", "MoreMsg" }, - } -elseif vim.fn.has("nvim-0.12") == 1 and not vim.lsp.is_enabled then - fail = { - { "LazyVim requires Neovim >= 0.11.2 or a recent Nightly\n", "ErrorMsg" }, - { "Your nightly is too old, please update to a more recent version.\n", "Comment" }, - { "Press any key to exit", "MoreMsg" }, - } -end - -if fail then - vim.api.nvim_echo(fail, true, {}) + }, true, {}) vim.fn.getchar() vim.cmd([[quit]]) return {} +elseif not vim.lsp.is_enabled then + vim.schedule(function() + LazyVim.warn({ + "You're using an **old** `nightly` version of **Neovim**", + "Please update to a recent `nightly`,", + "or a stable version (`>= 0.11.2`).", + }) + end) end require("lazyvim.config").init() diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index bc6a7f46..51b6f022 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -235,7 +235,7 @@ return { }) end - if vim.lsp.is_enabled("denols") and vim.lsp.is_enabled("vtsls") then + if vim.lsp.is_enabled and vim.lsp.is_enabled("denols") and vim.lsp.is_enabled("vtsls") then ---@param server string local resolve = function(server) local markers, root_dir = vim.lsp.config[server].root_markers, vim.lsp.config[server].root_dir From cd7ae5bc74d7459170e39d8bf9c26ad3777d393f Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Fri, 19 Sep 2025 06:12:49 +0000 Subject: [PATCH 078/103] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 5c3e670d..906717b6 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 18 +*LazyVim.txt* For Neovim Last change: 2025 September 19 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 26590285ead7a89bb45f309714f7f40136c89267 Mon Sep 17 00:00:00 2001 From: Wendel Macedo Date: Fri, 19 Sep 2025 03:38:33 -0300 Subject: [PATCH 079/103] feat(clojure): use 'nvim-paredit' instead 'nvim-treesitter-sexp' as clojure S-exp Plugin (#5876) ## Description On [this bug](https://github.com/LazyVim/LazyVim/issues/5866) I told about a plugin that was falty on clojure lang extra, with the goal to have him removed but @mitchelkuijpers suggested a new one that I implemented on this PR. [The plugin](https://github.com/julienvincent/nvim-paredit) is 1:1 with the keymaps of the older one. ## Related Issue(s) https://github.com/LazyVim/LazyVim/issues/5866 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/clojure.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/clojure.lua b/lua/lazyvim/plugins/extras/lang/clojure.lua index 7197aabd..06a7d141 100644 --- a/lua/lazyvim/plugins/extras/lang/clojure.lua +++ b/lua/lazyvim/plugins/extras/lang/clojure.lua @@ -27,7 +27,7 @@ return { }, -- Add s-exp mappings - { "PaterJason/nvim-treesitter-sexp", opts = {}, event = "LazyFile" }, + { "julienvincent/nvim-paredit", opts = {}, event = "LazyFile" }, -- Colorize the output of the log buffer { From 55e762a8888cd5f336e4e2d4b2cc6b8b1b950663 Mon Sep 17 00:00:00 2001 From: gbprod Date: Fri, 19 Sep 2025 11:29:07 +0200 Subject: [PATCH 080/103] feat(yanky): use snacks picker for improved yank history navigation (#5802) ## Description I've introduce snacks picker support for [Yanky history ring](https://github.com/gbprod/yanky.nvim/pull/215), I propose to use it in LazyVim. ## Screenshots ![image](https://github.com/user-attachments/assets/0e11bab4-3060-418b-8fa1-33df6a4ee8c5) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/yanky.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/lazyvim/plugins/extras/coding/yanky.lua b/lua/lazyvim/plugins/extras/coding/yanky.lua index c880aceb..6285796d 100644 --- a/lua/lazyvim/plugins/extras/coding/yanky.lua +++ b/lua/lazyvim/plugins/extras/coding/yanky.lua @@ -13,6 +13,8 @@ return { function() if LazyVim.pick.picker.name == "telescope" then require("telescope").extensions.yank_history.yank_history({}) + elseif LazyVim.pick.picker.name == "snacks" then + Snacks.picker.yanky() else vim.cmd([[YankyRingHistory]]) end From 5ce7cd650a5fffc257e0312b82fffd26abe2a1fa Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 19 Sep 2025 19:58:28 +0200 Subject: [PATCH 081/103] fix(treesitter): check if queries for indent/fold exists before enabling it. Fixes #6474 --- lua/lazyvim/plugins/treesitter.lua | 4 ++-- lua/lazyvim/util/treesitter.lua | 32 +++++++++++++++++++++++------- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 751a72f3..5721979d 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -94,12 +94,12 @@ return { end -- indents - if vim.tbl_get(opts, "indent", "enable") ~= false then + if vim.tbl_get(opts, "indent", "enable") ~= false and LazyVim.treesitter.have(ev.match, "indents") then LazyVim.set_default("indentexpr", "v:lua.LazyVim.treesitter.indentexpr()") end -- folds - if vim.tbl_get(opts, "folds", "enable") ~= false then + if vim.tbl_get(opts, "folds", "enable") ~= false and LazyVim.treesitter.have(ev.match, "folds") then if LazyVim.set_default("foldmethod", "expr") then LazyVim.set_default("foldexpr", "v:lua.LazyVim.treesitter.foldexpr()") end diff --git a/lua/lazyvim/util/treesitter.lua b/lua/lazyvim/util/treesitter.lua index 5df6aa53..b1d647e8 100644 --- a/lua/lazyvim/util/treesitter.lua +++ b/lua/lazyvim/util/treesitter.lua @@ -1,36 +1,54 @@ ---@class lazyvim.util.treesitter local M = {} -M._installed = nil ---@type table? +M._installed = nil ---@type table? +M._queries = {} ---@type table ---@param update boolean? function M.get_installed(update) if update then - M._installed = {} + M._installed, M._queries = {}, {} for _, lang in ipairs(require("nvim-treesitter").get_installed("parsers")) do - M._installed[lang] = lang + M._installed[lang] = true end end return M._installed or {} end +---@param lang string +---@param query string +function M.have_query(lang, query) + local key = lang .. ":" .. query + if M._queries[key] == nil then + M._queries[key] = vim.treesitter.query.get(lang, query) ~= nil + end + return M._queries[key] +end + ---@param what string|number|nil +---@param query? string ---@overload fun(buf?:number):boolean ---@overload fun(ft:string):boolean ---@return boolean -function M.have(what) +function M.have(what, query) what = what or vim.api.nvim_get_current_buf() what = type(what) == "number" and vim.bo[what].filetype or what --[[@as string]] local lang = vim.treesitter.language.get_lang(what) - return lang ~= nil and M.get_installed()[lang] ~= nil + if lang == nil or M.get_installed()[lang] == nil then + return false + end + if query and not M.have_query(lang, query) then + return false + end + return true end function M.foldexpr() - return M.have() and vim.treesitter.foldexpr() or "0" + return M.have(nil, "folds") and vim.treesitter.foldexpr() or "0" end function M.indentexpr() - return M.have() and require("nvim-treesitter").indentexpr() or -1 + return M.have(nil, "indents") and require("nvim-treesitter").indentexpr() or -1 end ---@param cb fun() From 9c611b0c5758d0d659e7fdb29119b7083a56f989 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 19 Sep 2025 20:26:36 +0200 Subject: [PATCH 082/103] fix(options): track some initial options right after loading `options.lua`. See #6463 --- lua/lazyvim/config/init.lua | 8 ++++++++ lua/lazyvim/util/init.lua | 14 +++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 0df3885b..344bcb56 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -304,6 +304,8 @@ function M.load(name) end M.did_init = false +M._options = {} ---@type vim.wo|vim.bo + function M.init() if M.did_init then return @@ -326,6 +328,12 @@ function M.init() -- this is needed to make sure options will be correctly applied -- after installing missing plugins M.load("options") + + -- save some options to track defaults + M._options.indentexpr = vim.o.indentexpr + M._options.foldmethod = vim.o.foldmethod + M._options.foldexpr = vim.o.foldexpr + -- defer built-in clipboard handling: "xsel" and "pbcopy" can be slow lazy_clipboard = vim.opt.clipboard vim.opt.clipboard = "" diff --git a/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index ac3ffcec..812e6f22 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -317,11 +317,12 @@ local _defaults = {} ---@type table ---@return boolean was_set function M.set_default(option, value) local l = vim.api.nvim_get_option_value(option, { scope = "local" }) - local g = vim.api.nvim_get_option_value(option, { scope = "global" }) + local g = LazyVim.config._options[option] or vim.api.nvim_get_option_value(option, { scope = "global" }) _defaults[("%s=%s"):format(option, value)] = true local key = ("%s=%s"):format(option, l) + local source = "" if l ~= g and not _defaults[key] then -- Option does not match global and is not a default value -- Check if it was set by a script in $VIMRUNTIME @@ -330,11 +331,12 @@ function M.set_default(option, value) local scriptinfo = vim.tbl_filter(function(e) return e.sid == info.last_set_sid end, vim.fn.getscriptinfo()) + source = scriptinfo[1] and scriptinfo[1].name or "" local by_rtp = #scriptinfo == 1 and vim.startswith(scriptinfo[1].name, vim.fn.expand("$VIMRUNTIME")) if not by_rtp then if vim.g.lazyvim_debug_set_default then LazyVim.warn( - ("Not setting option `%s` to `%s` because it was changed by a filetype plugin."):format(option, value), + ("Not setting option `%s` to `%q` because it was changed by a plugin."):format(option, value), { title = "LazyVim", once = true } ) end @@ -343,7 +345,13 @@ function M.set_default(option, value) end if vim.g.lazyvim_debug_set_default then - LazyVim.info(("Setting option `%s` to `%s`"):format(option, value), { title = "LazyVim", once = true }) + LazyVim.info({ + ("Setting option `%s` to `%q`"):format(option, value), + ("Was: %q"):format(l), + ("Global: %q"):format(g), + source ~= "" and ("Last set by: %s"):format(source) or "", + "buf: " .. vim.api.nvim_buf_get_name(0), + }, { title = "LazyVim", once = true }) end vim.api.nvim_set_option_value(option, value, { scope = "local" }) From 55b5c1fecb0b7e71c5eb40555b17d1e4820690f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frestein=20=E2=98=81=EF=B8=8F?= Date: Sat, 20 Sep 2025 17:08:56 +0500 Subject: [PATCH 083/103] fix(lang.clojure): correct cmp-conjure source name (#6208) ## Description https://github.com/PaterJason/cmp-conjure/blob/8c9a88efedc0e5bf3165baa6af8a407afe29daf6/README.md?plain=1#L10 ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/clojure.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/clojure.lua b/lua/lazyvim/plugins/extras/lang/clojure.lua index 06a7d141..c7af0b55 100644 --- a/lua/lazyvim/plugins/extras/lang/clojure.lua +++ b/lua/lazyvim/plugins/extras/lang/clojure.lua @@ -21,7 +21,7 @@ return { }, opts = function(_, opts) if type(opts.sources) == "table" then - vim.list_extend(opts.sources, { name = "clojure" }) + vim.list_extend(opts.sources, { name = "conjure" }) end end, }, From c9efea84311f520cd58263dc7702870abfb5f20b Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sat, 20 Sep 2025 12:10:18 +0000 Subject: [PATCH 084/103] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 906717b6..f7f29509 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 19 +*LazyVim.txt* For Neovim Last change: 2025 September 20 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 65e38d3b34cab653a05318c1a9014df3c89fdb53 Mon Sep 17 00:00:00 2001 From: vector Date: Sat, 20 Sep 2025 21:48:35 +0800 Subject: [PATCH 085/103] fix(editor): calculate the height passed to the prompt of fzf-lua properly (#6481) ## Description add two lines more to the height of prompt window. ## Related Issue(s) - Fixes #6480 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/fzf.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index 31297b94..9e7ef671 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -120,7 +120,7 @@ return { winopts = { layout = "vertical", -- height is number of items minus 15 lines for the preview, with a max of 80% screen height - height = math.floor(math.min(vim.o.lines * 0.8 - 16, #items + 2) + 0.5) + 16, + height = math.floor(math.min(vim.o.lines * 0.8 - 16, #items + 4) + 0.5) + 16, width = 0.5, preview = not vim.tbl_isempty(vim.lsp.get_clients({ bufnr = 0, name = "vtsls" })) and { layout = "vertical", @@ -135,7 +135,7 @@ return { winopts = { width = 0.5, -- height is number of items, with a max of 80% screen height - height = math.floor(math.min(vim.o.lines * 0.8, #items + 2) + 0.5), + height = math.floor(math.min(vim.o.lines * 0.8, #items + 4) + 0.5), }, }) end, From b4606f9df3395a261bb6a09acc837993da5d8bfc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 20 Sep 2025 16:50:44 +0200 Subject: [PATCH 086/103] chore(main): release 15.2.0 (#6468) :robot: I have created a release *beep* *boop* --- ## [15.2.0](https://github.com/LazyVim/LazyVim/compare/v15.1.1...v15.2.0) (2025-09-20) ### Features * **clojure:** use 'nvim-paredit' instead 'nvim-treesitter-sexp' as clojure S-exp Plugin ([#5876](https://github.com/LazyVim/LazyVim/issues/5876)) ([2659028](https://github.com/LazyVim/LazyVim/commit/26590285ead7a89bb45f309714f7f40136c89267)) * **core:** relax hard requirement for `vim.lsp.is_enabled`. Show warning instead ([3ca7b47](https://github.com/LazyVim/LazyVim/commit/3ca7b47365c85a07047e48cad450feff66c8bdd6)) * **options:** don't overwrite indentexpr/foldexpr/foldmethod when set by plugins. Fixes [#6464](https://github.com/LazyVim/LazyVim/issues/6464) ([ccbaf55](https://github.com/LazyVim/LazyVim/commit/ccbaf55c2f8bc691f8f64fe40ce00a1abda4fbac)) * **yanky:** use snacks picker for improved yank history navigation ([#5802](https://github.com/LazyVim/LazyVim/issues/5802)) ([55e762a](https://github.com/LazyVim/LazyVim/commit/55e762a8888cd5f336e4e2d4b2cc6b8b1b950663)) ### Bug Fixes * **editor:** calculate the height passed to the prompt of fzf-lua properly ([#6481](https://github.com/LazyVim/LazyVim/issues/6481)) ([65e38d3](https://github.com/LazyVim/LazyVim/commit/65e38d3b34cab653a05318c1a9014df3c89fdb53)) * **lang.clojure:** correct cmp-conjure source name ([#6208](https://github.com/LazyVim/LazyVim/issues/6208)) ([55b5c1f](https://github.com/LazyVim/LazyVim/commit/55b5c1fecb0b7e71c5eb40555b17d1e4820690f0)) * **options:** set_default option ([2401d5f](https://github.com/LazyVim/LazyVim/commit/2401d5fca6f2a2fcaca4f9c4c84c4b713c602352)) * **options:** track some initial options right after loading `options.lua`. See [#6463](https://github.com/LazyVim/LazyVim/issues/6463) ([9c611b0](https://github.com/LazyVim/LazyVim/commit/9c611b0c5758d0d659e7fdb29119b7083a56f989)) * **treesitter:** check if queries for indent/fold exists before enabling it. Fixes [#6474](https://github.com/LazyVim/LazyVim/issues/6474) ([5ce7cd6](https://github.com/LazyVim/LazyVim/commit/5ce7cd650a5fffc257e0312b82fffd26abe2a1fa)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 19 +++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 8e00e87c..b25a6511 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.1.1" + ".": "15.2.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index c1b5e9ac..21249147 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [15.2.0](https://github.com/LazyVim/LazyVim/compare/v15.1.1...v15.2.0) (2025-09-20) + + +### Features + +* **clojure:** use 'nvim-paredit' instead 'nvim-treesitter-sexp' as clojure S-exp Plugin ([#5876](https://github.com/LazyVim/LazyVim/issues/5876)) ([2659028](https://github.com/LazyVim/LazyVim/commit/26590285ead7a89bb45f309714f7f40136c89267)) +* **core:** relax hard requirement for `vim.lsp.is_enabled`. Show warning instead ([3ca7b47](https://github.com/LazyVim/LazyVim/commit/3ca7b47365c85a07047e48cad450feff66c8bdd6)) +* **options:** don't overwrite indentexpr/foldexpr/foldmethod when set by plugins. Fixes [#6464](https://github.com/LazyVim/LazyVim/issues/6464) ([ccbaf55](https://github.com/LazyVim/LazyVim/commit/ccbaf55c2f8bc691f8f64fe40ce00a1abda4fbac)) +* **yanky:** use snacks picker for improved yank history navigation ([#5802](https://github.com/LazyVim/LazyVim/issues/5802)) ([55e762a](https://github.com/LazyVim/LazyVim/commit/55e762a8888cd5f336e4e2d4b2cc6b8b1b950663)) + + +### Bug Fixes + +* **editor:** calculate the height passed to the prompt of fzf-lua properly ([#6481](https://github.com/LazyVim/LazyVim/issues/6481)) ([65e38d3](https://github.com/LazyVim/LazyVim/commit/65e38d3b34cab653a05318c1a9014df3c89fdb53)) +* **lang.clojure:** correct cmp-conjure source name ([#6208](https://github.com/LazyVim/LazyVim/issues/6208)) ([55b5c1f](https://github.com/LazyVim/LazyVim/commit/55b5c1fecb0b7e71c5eb40555b17d1e4820690f0)) +* **options:** set_default option ([2401d5f](https://github.com/LazyVim/LazyVim/commit/2401d5fca6f2a2fcaca4f9c4c84c4b713c602352)) +* **options:** track some initial options right after loading `options.lua`. See [#6463](https://github.com/LazyVim/LazyVim/issues/6463) ([9c611b0](https://github.com/LazyVim/LazyVim/commit/9c611b0c5758d0d659e7fdb29119b7083a56f989)) +* **treesitter:** check if queries for indent/fold exists before enabling it. Fixes [#6474](https://github.com/LazyVim/LazyVim/issues/6474) ([5ce7cd6](https://github.com/LazyVim/LazyVim/commit/5ce7cd650a5fffc257e0312b82fffd26abe2a1fa)) + ## [15.1.1](https://github.com/LazyVim/LazyVim/compare/v15.1.0...v15.1.1) (2025-09-18) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 344bcb56..e85dbd63 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.1.1" -- x-release-please-version +M.version = "15.2.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 89ff1fd600bb6ff4cf2c9edbc2217a40ecb8d160 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 21 Sep 2025 11:04:23 +0200 Subject: [PATCH 087/103] feat(treesitter): show an error if the user tries to set a custom treesitter compiler --- lua/lazyvim/plugins/treesitter.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 5721979d..8ad15924 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -58,6 +58,21 @@ return { config = function(_, opts) local TS = require("nvim-treesitter") + setmetatable(require("nvim-treesitter.install"), { + __newindex = function(_, k) + if k == "compilers" then + vim.schedule(function() + LazyVim.error({ + "Setting custom compilers for `nvim-treesitter` is no longer supported.", + "", + "For more info, see:", + "- [compilers](https://docs.rs/cc/latest/cc/#compile-time-requirements)", + }) + end) + end + end, + }) + -- some quick sanity checks if not TS.get_installed then return LazyVim.error("Please use `:Lazy` and update `nvim-treesitter`") From 89ce0438d6e78fd589ac9f41ec7b366c6581eb3c Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sun, 21 Sep 2025 09:05:18 +0000 Subject: [PATCH 088/103] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index f7f29509..054756aa 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 20 +*LazyVim.txt* For Neovim Last change: 2025 September 21 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 775621ac0af42486ef1cd4254d1a6625a190040b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 21 Sep 2025 11:58:57 +0200 Subject: [PATCH 089/103] fix(vtsls): fix and move denols/vtsls disambigutaion to typescript extra. Fixes #6476 --- .../plugins/extras/lang/typescript.lua | 22 +++++++++++++++++++ lua/lazyvim/plugins/lsp/init.lua | 22 ------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index 3830f795..64dcd394 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -131,6 +131,28 @@ return { return true end, vtsls = function(_, opts) + if vim.lsp.config.denols and vim.lsp.config.vtsls then + ---@param server string + local resolve = function(server) + local markers, root_dir = vim.lsp.config[server].root_markers, vim.lsp.config[server].root_dir + vim.lsp.config(server, { + root_dir = function(bufnr, on_dir) + local is_deno = vim.fs.root(bufnr, { "deno.json", "deno.jsonc" }) ~= nil + if is_deno == (server == "denols") then + if root_dir then + return root_dir(bufnr, on_dir) + elseif type(markers) == "table" then + local root = vim.fs.root(bufnr, markers) + return root and on_dir(root) + end + end + end, + }) + end + resolve("denols") + resolve("vtsls") + end + LazyVim.lsp.on_attach(function(client, buffer) client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx) ---@type string, string, lsp.Range diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 51b6f022..3810cb8c 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -234,28 +234,6 @@ return { }, }) end - - if vim.lsp.is_enabled and vim.lsp.is_enabled("denols") and vim.lsp.is_enabled("vtsls") then - ---@param server string - local resolve = function(server) - local markers, root_dir = vim.lsp.config[server].root_markers, vim.lsp.config[server].root_dir - vim.lsp.config(server, { - root_dir = function(bufnr, on_dir) - local is_deno = vim.fs.root(bufnr, { "deno.json", "deno.jsonc" }) ~= nil - if is_deno == (server == "denols") then - if root_dir then - return root_dir(bufnr, on_dir) - elseif type(markers) == "table" then - local root = vim.fs.root(bufnr, markers) - return root and on_dir(root) - end - end - end, - }) - end - resolve("denols") - resolve("vtsls") - end end), }, From 16637dd655e3ed6b88d3fcd2ed8ed75420a89415 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 21 Sep 2025 12:34:27 +0200 Subject: [PATCH 090/103] refactor(lsp): cleanup lsp/mason-lspconfig code --- lua/lazyvim/plugins/lsp/init.lua | 60 ++++++++++++-------------------- 1 file changed, 23 insertions(+), 37 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 3810cb8c..324777d8 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -68,7 +68,8 @@ return { timeout_ms = nil, }, -- LSP Server Settings - ---@type table + ---@alias lazyvim.lsp.Config vim.lsp.Config|{mason?:boolean, enabled?:boolean} + ---@type table servers = { lua_ls = { -- mason = false, -- set to false if you don't want this server to be installed with mason @@ -187,51 +188,36 @@ return { and vim.tbl_keys(require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package) or {} --[[ @as string[] ]] - local exclude_automatic_enable = {} ---@type string[] - + ---@return boolean? exclude automatic setup local function configure(server) - local server_opts = opts.servers[server] or {} - - local setup = opts.setup[server] or opts.setup["*"] - if setup and setup(server, server_opts) then - return true -- lsp will be setup by the setup function - end - - vim.lsp.config(server, server_opts) - - -- manually enable if mason=false or if this is a server that cannot be installed with mason-lspconfig - if server_opts.mason == false or not vim.tbl_contains(mason_all, server) then - vim.lsp.enable(server) + local sopts = opts.servers[server] + sopts = sopts == true and {} or (not sopts) and { enabled = false } or sopts --[[@as lazyvim.lsp.Config]] + if sopts.enabled == false then return true end - return false - end - local ensure_installed = {} ---@type string[] - for server, server_opts in pairs(opts.servers) do - server_opts = server_opts == true and {} or server_opts or false - if server_opts and server_opts.enabled ~= false then - -- run manual setup if mason=false or if this is a server that cannot be installed with mason-lspconfig - if configure(server) then - exclude_automatic_enable[#exclude_automatic_enable + 1] = server - else - ensure_installed[#ensure_installed + 1] = server - end - else - exclude_automatic_enable[#exclude_automatic_enable + 1] = server + local setup = opts.setup[server] or opts.setup["*"] + if setup and setup(server, sopts) then + return true -- lsp will be configured and enabled by the setup function + end + + vim.lsp.config(server, sopts) -- configure the server + + -- manually enable if mason=false or if this is a server that cannot be installed with mason-lspconfig + if sopts.mason == false or not vim.tbl_contains(mason_all, server) then + vim.lsp.enable(server) + return true end end if have_mason then + local servers = vim.tbl_keys(opts.servers) + local exclude = vim.tbl_filter(configure, servers) require("mason-lspconfig").setup({ - ensure_installed = vim.tbl_deep_extend( - "force", - ensure_installed, - LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {} - ), - automatic_enable = { - exclude = exclude_automatic_enable, - }, + ensure_installed = vim.tbl_filter(function(server) + return not vim.tbl_contains(exclude, server) + end, vim.list_extend(servers, LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {})), + automatic_enable = { exclude = exclude }, }) end end), From a90b56518f4f2291985952d79472d4f935c0bad0 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 21 Sep 2025 12:35:17 +0200 Subject: [PATCH 091/103] fix(lsp): fixup for when not using mason --- lua/lazyvim/plugins/lsp/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 324777d8..4be74c82 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -210,9 +210,9 @@ return { end end + local servers = vim.tbl_keys(opts.servers) + local exclude = vim.tbl_filter(configure, servers) if have_mason then - local servers = vim.tbl_keys(opts.servers) - local exclude = vim.tbl_filter(configure, servers) require("mason-lspconfig").setup({ ensure_installed = vim.tbl_filter(function(server) return not vim.tbl_contains(exclude, server) From 13069f20183655d8a02f3acbd21d0ac4c9ce811c Mon Sep 17 00:00:00 2001 From: Zhou Fang Date: Sun, 21 Sep 2025 21:40:15 +0900 Subject: [PATCH 092/103] feat(copilot): use `blink-copilot` as blink.cmp copilot source (#5551) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description After reviewing and fixing bugs in blink-cmp-copilot, I realized that there is significant room for improvement in its codebase. So I created a new copilot source `blink-copilot` for `blink.cmp` that introduces many new features, enhanced performance, and official `copilot.vim` backend support. (`copilot.lua` is supported by default) The plugin has been starred by over 30 users, and it is growing faster than blink-cmp-copilot. After more than two weeks of gathering feedback and addressing bugs, the plugin has become very stable, and I believe it’s time to share it with a broader audience. `blink-copilot` register the kind `Copilot` by default, so there is no need to do extra transforming on the completion items. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ai/copilot.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index 48870743..7c326499 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -98,15 +98,14 @@ return { { "saghen/blink.cmp", optional = true, - dependencies = { "giuxtaposition/blink-cmp-copilot" }, + dependencies = { "fang2hou/blink-copilot" }, opts = { sources = { default = { "copilot" }, providers = { copilot = { name = "copilot", - module = "blink-cmp-copilot", - kind = "Copilot", + module = "blink-copilot", score_offset = 100, async = true, }, From 7d5365ad1463c61936f06ed4eeeefc819e36b3c3 Mon Sep 17 00:00:00 2001 From: Vladimir Shvets Date: Sun, 21 Sep 2025 20:29:53 +0700 Subject: [PATCH 093/103] fix(lualine): pretty path fix for mixed case paths on Windows (#4911) ## Description Here's an example of the issue: ```lua local pretty_path = require('lazyvim.util').lualine.pretty_path({ relative = 'cwd' }) -- just a stub local component = { create_hl = function() end, format_hl = function() return '' end, get_default_hl = function() return '' end } local cwd = vim.fn.getcwd() vim.print('cwd: ' .. cwd) vim.print('pretty path: ' .. pretty_path(component)) -- results if `cd d:\tmp` was called previously -- cwd: d:\tmp -- pretty path: d:\tmp\pretty_path_issue.lua -- -- results if `cd D:\tmp` was called previously -- cwd: D:\tmp -- pretty path: pretty_path_issue.lua ``` Depending on the initial path of the `cd` we either get a pretty path or we don't =) I'm not sure if this should be fixed in the neovim itself (considering windows paths as case-insensitive), but I would assume that would take a lot longer to land there, if it's even considered a needed change ## Related Issue(s) Somewhat related to #4763, where I've left a comment, but decided to look a bit deeper ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/util/lualine.lua | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/util/lualine.lua b/lua/lazyvim/util/lualine.lua index 5f4f1885..a6aa24f3 100644 --- a/lua/lazyvim/util/lualine.lua +++ b/lua/lazyvim/util/lualine.lua @@ -101,9 +101,20 @@ function M.pretty_path(opts) local root = LazyVim.root.get({ normalize = true }) local cwd = LazyVim.root.cwd() - if opts.relative == "cwd" and path:find(cwd, 1, true) == 1 then + -- original path is preserved to provide user with expected result of pretty_path, not a normalized one, + -- which might be confusing + local norm_path = path + + if LazyVim.is_win() then + -- in case any of the provided paths involved mixed case, an additional normalization step for windows + norm_path = norm_path:lower() + root = root:lower() + cwd = cwd:lower() + end + + if opts.relative == "cwd" and norm_path:find(cwd, 1, true) == 1 then path = path:sub(#cwd + 2) - elseif path:find(root, 1, true) == 1 then + elseif norm_path:find(root, 1, true) == 1 then path = path:sub(#root + 2) end From 720e06a908cbf6e3afb4eccc049d58df9ace770a Mon Sep 17 00:00:00 2001 From: filip Date: Sun, 21 Sep 2025 15:42:38 +0200 Subject: [PATCH 094/103] fix(keymaps): enable snacks git keybindings (#6323) ## Description Enable snacks git keybindings even if `lazygit` is not installed Related discussion: https://github.com/LazyVim/LazyVim/discussions/6322 ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/keymaps.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index acaf44d9..938a2333 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -163,12 +163,12 @@ end if vim.fn.executable("lazygit") == 1 then map("n", "gg", function() Snacks.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" }) map("n", "gG", function() Snacks.lazygit() end, { desc = "Lazygit (cwd)" }) - map("n", "gf", function() Snacks.picker.git_log_file() end, { desc = "Git Current File History" }) - map("n", "gl", function() Snacks.picker.git_log({ cwd = LazyVim.root.git() }) end, { desc = "Git Log" }) - map("n", "gL", function() Snacks.picker.git_log() end, { desc = "Git Log (cwd)" }) end +map("n", "gL", function() Snacks.picker.git_log() end, { desc = "Git Log (cwd)" }) map("n", "gb", function() Snacks.picker.git_log_line() end, { desc = "Git Blame Line" }) +map("n", "gf", function() Snacks.picker.git_log_file() end, { desc = "Git Current File History" }) +map("n", "gl", function() Snacks.picker.git_log({ cwd = LazyVim.root.git() }) end, { desc = "Git Log" }) map({ "n", "x" }, "gB", function() Snacks.gitbrowse() end, { desc = "Git Browse (open)" }) map({"n", "x" }, "gY", function() Snacks.gitbrowse({ open = function(url) vim.fn.setreg("+", url) end, notify = false }) From 37a1c1af5dbbcf069bb94a71b4dda3626fbda77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frestein=20=E2=98=81=EF=B8=8F?= Date: Sun, 21 Sep 2025 18:51:56 +0500 Subject: [PATCH 095/103] fix(luasnip): add missing optional tag to garymjr/nvim-snippets (#5733) ## Description This pull request fixes an issue where the `nvim-snippets` plugin was incorrectly marked as disabled due to the missing optional tag in the configuration. By adding the `optional = true` tag, the plugin will no longer appear as disabled when it is not installed. ## Related Issue(s) ## Screenshots Before: ![image](https://github.com/user-attachments/assets/8391b047-22e6-416b-acb8-3b8af3932469) After: ![image](https://github.com/user-attachments/assets/8c1775ce-8aa9-434e-986d-a1db3ac7bd56) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/luasnip.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index 85ed2fd5..5b62113e 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -1,6 +1,6 @@ return { -- disable builtin snippet support - { "garymjr/nvim-snippets", enabled = false }, + { "garymjr/nvim-snippets", optional = true, enabled = false }, -- add luasnip { From 80990ec62fd36fc4b6b921a9041f55858e33e030 Mon Sep 17 00:00:00 2001 From: dareni Date: Mon, 22 Sep 2025 21:55:56 +1000 Subject: [PATCH 096/103] fix(jdtls): allow mason jdtls installation (#6498) Bug fix jdtls config for compatibility with last lsp refactor. --- lua/lazyvim/plugins/extras/lang/java.lua | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index d4eb5f6e..24a754df 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -71,11 +71,6 @@ return { servers = { jdtls = {}, }, - setup = { - jdtls = function() - return true -- avoid duplicate servers - end, - }, }, }, From c4237659621e406089f4d13d32192954d52c4924 Mon Sep 17 00:00:00 2001 From: dareni Date: Mon, 22 Sep 2025 21:56:18 +1000 Subject: [PATCH 097/103] fix(jdtls): bundle configuration bug fix (#6499) The jar for the debug adapter was included but the operation to append the java-test jar files failed. --- lua/lazyvim/plugins/extras/lang/java.lua | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 24a754df..28441c5c 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -145,19 +145,10 @@ return { if LazyVim.has("mason.nvim") then local mason_registry = require("mason-registry") if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then - local jar_patterns = { - vim.fn.expand("$MASON/share/java-debug-adapter/com.microsoft.java.debug.plugin-*.jar"), - } + bundles = vim.fn.glob("$MASON/share/java-debug-adapter/com.microsoft.java.debug.plugin-*jar", false, true) -- java-test also depends on java-debug-adapter. if opts.test and mason_registry.is_installed("java-test") then - vim.list_extend(jar_patterns, { - vim.fn.expand("$MASON/share/java-test/*.jar"), - }) - end - for _, jar_pattern in ipairs(jar_patterns) do - for _, bundle in ipairs(vim.split(vim.fn.glob(jar_pattern), "\n")) do - table.insert(bundles, bundle) - end + vim.list_extend(bundles, vim.fn.glob("$MASON/share/java-test/*.jar", false, true)) end end end From 21518ae8a32cc56cfd8eefbbe33b8fe801d5bb3a Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Mon, 22 Sep 2025 11:57:00 +0000 Subject: [PATCH 098/103] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 054756aa..e454f9cf 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 21 +*LazyVim.txt* For Neovim Last change: 2025 September 22 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 37b1ec41ae57e8396d5c923a4bfdf7050215b4d6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 23 Sep 2025 12:58:45 +0200 Subject: [PATCH 099/103] fix(lsp): fix mason install/exclude. Closes #6504 --- lua/lazyvim/plugins/lsp/init.lua | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 4be74c82..35ff4505 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -187,37 +187,36 @@ return { local mason_all = have_mason and vim.tbl_keys(require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package) or {} --[[ @as string[] ]] + local mason_exclude = {}, {} ---@type string[] ---@return boolean? exclude automatic setup local function configure(server) local sopts = opts.servers[server] sopts = sopts == true and {} or (not sopts) and { enabled = false } or sopts --[[@as lazyvim.lsp.Config]] + if sopts.enabled == false then - return true + mason_exclude[#mason_exclude + 1] = server + return end + local use_mason = sopts.mason ~= false and vim.tbl_contains(mason_all, server) local setup = opts.setup[server] or opts.setup["*"] if setup and setup(server, sopts) then - return true -- lsp will be configured and enabled by the setup function - end - - vim.lsp.config(server, sopts) -- configure the server - - -- manually enable if mason=false or if this is a server that cannot be installed with mason-lspconfig - if sopts.mason == false or not vim.tbl_contains(mason_all, server) then - vim.lsp.enable(server) - return true + mason_exclude[#mason_exclude + 1] = server + else + vim.lsp.config(server, sopts) -- configure the server + if not use_mason then + vim.lsp.enable(server) + end end + return use_mason end - local servers = vim.tbl_keys(opts.servers) - local exclude = vim.tbl_filter(configure, servers) + local install = vim.tbl_filter(configure, vim.tbl_keys(opts.servers)) if have_mason then require("mason-lspconfig").setup({ - ensure_installed = vim.tbl_filter(function(server) - return not vim.tbl_contains(exclude, server) - end, vim.list_extend(servers, LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {})), - automatic_enable = { exclude = exclude }, + ensure_installed = vim.list_extend(install, LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {}), + automatic_enable = { exclude = mason_exclude }, }) end end), From 6229f5a2dda91da50b72d1bef973df4db8daac8d Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Tue, 23 Sep 2025 10:59:38 +0000 Subject: [PATCH 100/103] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index e454f9cf..dbeb4819 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 22 +*LazyVim.txt* For Neovim Last change: 2025 September 23 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 67781bda04195e99d187dece5a27bf067bfb34cd Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 23 Sep 2025 13:00:13 +0200 Subject: [PATCH 101/103] Revert "fix(jdtls): allow mason jdtls installation (#6498)" This reverts commit 80990ec62fd36fc4b6b921a9041f55858e33e030. --- lua/lazyvim/plugins/extras/lang/java.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 28441c5c..4dd1d77f 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -71,6 +71,11 @@ return { servers = { jdtls = {}, }, + setup = { + jdtls = function() + return true -- avoid duplicate servers + end, + }, }, }, From 6e3a06306d72a7f7a401c007f56706023a6c00ea Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 23 Sep 2025 13:02:58 +0200 Subject: [PATCH 102/103] chore(main): release 15.3.0 (#6486) :robot: I have created a release *beep* *boop* --- ## [15.3.0](https://github.com/LazyVim/LazyVim/compare/v15.2.0...v15.3.0) (2025-09-23) ### Features * **copilot:** use `blink-copilot` as blink.cmp copilot source ([#5551](https://github.com/LazyVim/LazyVim/issues/5551)) ([13069f2](https://github.com/LazyVim/LazyVim/commit/13069f20183655d8a02f3acbd21d0ac4c9ce811c)) * **treesitter:** show an error if the user tries to set a custom treesitter compiler ([89ff1fd](https://github.com/LazyVim/LazyVim/commit/89ff1fd600bb6ff4cf2c9edbc2217a40ecb8d160)) ### Bug Fixes * **jdtls:** allow mason jdtls installation ([#6498](https://github.com/LazyVim/LazyVim/issues/6498)) ([80990ec](https://github.com/LazyVim/LazyVim/commit/80990ec62fd36fc4b6b921a9041f55858e33e030)) * **jdtls:** bundle configuration bug fix ([#6499](https://github.com/LazyVim/LazyVim/issues/6499)) ([c423765](https://github.com/LazyVim/LazyVim/commit/c4237659621e406089f4d13d32192954d52c4924)) * **keymaps:** enable snacks git keybindings ([#6323](https://github.com/LazyVim/LazyVim/issues/6323)) ([720e06a](https://github.com/LazyVim/LazyVim/commit/720e06a908cbf6e3afb4eccc049d58df9ace770a)) * **lsp:** fix mason install/exclude. Closes [#6504](https://github.com/LazyVim/LazyVim/issues/6504) ([37b1ec4](https://github.com/LazyVim/LazyVim/commit/37b1ec41ae57e8396d5c923a4bfdf7050215b4d6)) * **lsp:** fixup for when not using mason ([a90b565](https://github.com/LazyVim/LazyVim/commit/a90b56518f4f2291985952d79472d4f935c0bad0)) * **luasnip:** add missing optional tag to garymjr/nvim-snippets ([#5733](https://github.com/LazyVim/LazyVim/issues/5733)) ([37a1c1a](https://github.com/LazyVim/LazyVim/commit/37a1c1af5dbbcf069bb94a71b4dda3626fbda77a)) * **vtsls:** fix and move denols/vtsls disambigutaion to typescript extra. Fixes [#6476](https://github.com/LazyVim/LazyVim/issues/6476) ([775621a](https://github.com/LazyVim/LazyVim/commit/775621ac0af42486ef1cd4254d1a6625a190040b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 19 +++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index b25a6511..b0e2e610 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.2.0" + ".": "15.3.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 21249147..5b8c6724 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [15.3.0](https://github.com/LazyVim/LazyVim/compare/v15.2.0...v15.3.0) (2025-09-23) + + +### Features + +* **copilot:** use `blink-copilot` as blink.cmp copilot source ([#5551](https://github.com/LazyVim/LazyVim/issues/5551)) ([13069f2](https://github.com/LazyVim/LazyVim/commit/13069f20183655d8a02f3acbd21d0ac4c9ce811c)) +* **treesitter:** show an error if the user tries to set a custom treesitter compiler ([89ff1fd](https://github.com/LazyVim/LazyVim/commit/89ff1fd600bb6ff4cf2c9edbc2217a40ecb8d160)) + + +### Bug Fixes + +* **jdtls:** allow mason jdtls installation ([#6498](https://github.com/LazyVim/LazyVim/issues/6498)) ([80990ec](https://github.com/LazyVim/LazyVim/commit/80990ec62fd36fc4b6b921a9041f55858e33e030)) +* **jdtls:** bundle configuration bug fix ([#6499](https://github.com/LazyVim/LazyVim/issues/6499)) ([c423765](https://github.com/LazyVim/LazyVim/commit/c4237659621e406089f4d13d32192954d52c4924)) +* **keymaps:** enable snacks git keybindings ([#6323](https://github.com/LazyVim/LazyVim/issues/6323)) ([720e06a](https://github.com/LazyVim/LazyVim/commit/720e06a908cbf6e3afb4eccc049d58df9ace770a)) +* **lsp:** fix mason install/exclude. Closes [#6504](https://github.com/LazyVim/LazyVim/issues/6504) ([37b1ec4](https://github.com/LazyVim/LazyVim/commit/37b1ec41ae57e8396d5c923a4bfdf7050215b4d6)) +* **lsp:** fixup for when not using mason ([a90b565](https://github.com/LazyVim/LazyVim/commit/a90b56518f4f2291985952d79472d4f935c0bad0)) +* **luasnip:** add missing optional tag to garymjr/nvim-snippets ([#5733](https://github.com/LazyVim/LazyVim/issues/5733)) ([37a1c1a](https://github.com/LazyVim/LazyVim/commit/37a1c1af5dbbcf069bb94a71b4dda3626fbda77a)) +* **vtsls:** fix and move denols/vtsls disambigutaion to typescript extra. Fixes [#6476](https://github.com/LazyVim/LazyVim/issues/6476) ([775621a](https://github.com/LazyVim/LazyVim/commit/775621ac0af42486ef1cd4254d1a6625a190040b)) + ## [15.2.0](https://github.com/LazyVim/LazyVim/compare/v15.1.1...v15.2.0) (2025-09-20) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index e85dbd63..1d288cd2 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.2.0" -- x-release-please-version +M.version = "15.3.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 8a760984611cd9df0971a9f36a94838b9e32453f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 23 Sep 2025 13:06:33 +0200 Subject: [PATCH 103/103] style(lsp): typo --- lua/lazyvim/plugins/lsp/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 35ff4505..2fe3ae97 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -187,7 +187,7 @@ return { local mason_all = have_mason and vim.tbl_keys(require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package) or {} --[[ @as string[] ]] - local mason_exclude = {}, {} ---@type string[] + local mason_exclude = {} ---@type string[] ---@return boolean? exclude automatic setup local function configure(server)