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

32 lines
530 B
Lua
Raw Normal View History

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