fix: updated require(lspconfig) to vim.lsp.config('...')
This commit is contained in:
@@ -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 = {
|
||||
{ "<leader>pc", "<cmd>ClangdSwitchSourceHeader<cr>", 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,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user