From c74930b788c6f23b59f0efd769f95b3ef94530a0 Mon Sep 17 00:00:00 2001 From: Ward Truyen Date: Sat, 28 Feb 2026 12:49:05 +0100 Subject: [PATCH] fix: updated require(lspconfig) to vim.lsp.config('...') --- lua/ward/plugins/lsp-config.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lua/ward/plugins/lsp-config.lua b/lua/ward/plugins/lsp-config.lua index 247bd6a..cabf62e 100644 --- a/lua/ward/plugins/lsp-config.lua +++ b/lua/ward/plugins/lsp-config.lua @@ -1,10 +1,11 @@ +-- URL: https://github.com/neovim/nvim-lspconfig -- NOTE: this adds a Language Server Provider for source files like C++, Java/-Script, etc. -- It will check the code for errors, warnings, variables and structures and give suggestions. return { "neovim/nvim-lspconfig", version = "*", config = function() - local lspconfig = require("lspconfig") + -- local lspconfig = require("lspconfig") vim.cmd([[autocmd! ColorScheme * highlight NormalFloat guibg=#1f2335]]) vim.cmd([[autocmd! ColorScheme * highlight FloatBorder guifg=white guibg=#1f2335]]) @@ -27,7 +28,8 @@ return { ["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border }), } - lspconfig.clangd.setup({ + -- lspconfig.clangd.setup({ + vim.lsp.config("clangd",{ keys = { { "pc", "ClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, }, @@ -49,7 +51,8 @@ return { handlers = handlers, }) - lspconfig.glsl_analyzer.setup({ + -- lspconfig.glsl_analyzer.setup({ + vim.lsp.config("glsl_analyzer",{ filetypes = { "glsl", "vert", "tese", "frag", "geom", "comp", "vs", "fs" }, handlers = handlers, }) @@ -77,14 +80,16 @@ return { }, }) - lspconfig.rust_analyzer.setup({ + -- lspconfig.rust_analyzer.setup({ + vim.lsp.config("rust_analyzer",{ settings = { ["rust-analyzer"] = {}, }, handlers = handlers, }) - lspconfig.lua_ls.setup({ + -- lspconfig.lua_ls.setup({ + vim.lsp.config("lua_ls",{ handlers = handlers, })