From b232dd23c7bb961528e8656742e9b27fb1825153 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Mon, 27 Oct 2025 22:19:24 +0000 Subject: [PATCH] nvim: replace require('lspconfig') with vim.lsp.config The former has been deprecated. --- nvim/lua/plugins/lsp/init.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nvim/lua/plugins/lsp/init.lua b/nvim/lua/plugins/lsp/init.lua index 132c412..09adfdd 100644 --- a/nvim/lua/plugins/lsp/init.lua +++ b/nvim/lua/plugins/lsp/init.lua @@ -83,7 +83,6 @@ return { }, ---@param opts PluginLspOpts config = function(_, opts) - local lspconfig = require('lspconfig') for server, config in pairs(opts.servers) do local capabilities = vim.tbl_deep_extend("force", vim.lsp.protocol.make_client_capabilities() or {}, @@ -91,7 +90,7 @@ return { config.capabilities or {} ) config.capabilities = capabilities - lspconfig[server].setup(config) + vim.lsp.config(server, config) end -- setup keymaps @@ -116,7 +115,7 @@ return { 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 - require("lspconfig")[server].setup(server_opts) + vim.lsp.config(server, server_opts) else ensure_installed[#ensure_installed + 1] = server end -- 2.51.2