From 72b5065a662f48a9ab0b0d4f4209269c106ce996 Mon Sep 17 00:00:00 2001 From: Ziqi Wang Date: Mon, 15 Dec 2025 10:59:27 +0200 Subject: [PATCH] fix: migrate to native vim.lsp.config for nvim 0.11+ (#1776) Replaces the deprecated `require('lspconfig')[name].setup()` pattern with Neovim's native `vim.lsp.config` and `vim.lsp.enable` APIs within the Mason handler. `nvim-lspconfig` is deprecating its internal framework logic in favor of Neovim's core LSP management. This change resolves the deprecation warning and ensures compatibility with nvim-lspconfig v3.0.0. --- init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index b98ffc61..42e9023e 100644 --- a/init.lua +++ b/init.lua @@ -729,7 +729,8 @@ require('lazy').setup({ -- by the server configuration above. Useful when disabling -- certain features of an LSP (for example, turning off formatting for ts_ls) server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {}) - require('lspconfig')[server_name].setup(server) + vim.lsp.config(server_name, server) + vim.lsp.enable(server_name) end, }, }