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 1/5] 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 2/5] 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 3/5] 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 4/5] 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 5/5] 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",