neovim-confs/lua/custom/plugins/configs/lsp.lua

32 lines
518 B
Lua
Raw Normal View History

2024-07-04 12:41:35 +02:00
local lspconfig = require "lspconfig"
local lspsettings = require "custom.plugins.configs.lspsettings"
-- these are using the defaults
local servers = {
"html",
"cssls",
"tsserver",
"clangd",
"bashls",
"cmake",
"yamlls",
"texlab",
"csharp_ls",
}
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup()
end
local server_with_settings = {
-- "textlsp",
"ltex",
"rust_analyzer",
"basedpyright",
}
for _, lsp in ipairs(server_with_settings) do
lspconfig[lsp].setup(lspsettings[lsp])
end