From 7e149df23643f518c79cbf212cc9135176d9ac60 Mon Sep 17 00:00:00 2001 From: t0xa Date: Tue, 2 Dec 2025 09:00:39 +0300 Subject: [PATCH] Migrate for new vim.lsp.config API fron require("lspconfig") --- lua/custom/lsp.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/custom/lsp.lua b/lua/custom/lsp.lua index 3ab8d79..2f6d1ac 100644 --- a/lua/custom/lsp.lua +++ b/lua/custom/lsp.lua @@ -1,4 +1,4 @@ -local lspconfig = require("lspconfig") +-- Using vim.lsp.config() instead of require('lspconfig') (nvim-lspconfig >= 0.11) local keymap = vim.keymap @@ -147,9 +147,12 @@ for name, config in pairs(servers) do capabilities = capabilities, }, config) - lspconfig[name].setup(config) + vim.lsp.config(name, config) end +-- Enable the configured servers +vim.lsp.enable(vim.tbl_keys(servers)) + -- Here it is used the LSP server attaches to file vim.api.nvim_create_autocmd("LspAttach", { -- Grouping together autocommands.