Skip to content

Commit 71b8ac4

Browse files
committed
fix: migrate to native vim.lsp.config for nvim 0.11+
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.
1 parent 3338d39 commit 71b8ac4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

init.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,8 @@ require('lazy').setup({
729729
-- by the server configuration above. Useful when disabling
730730
-- certain features of an LSP (for example, turning off formatting for ts_ls)
731731
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
732-
require('lspconfig')[server_name].setup(server)
732+
vim.lsp.config(server_name, server)
733+
vim.lsp.enable(server_name)
733734
end,
734735
},
735736
}

0 commit comments

Comments
 (0)