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

35 lines
631 B
Lua

local lspconfig = require 'lspconfig'
local lspsettings = require 'custom.plugins.configs.lspsettings'
local capabilities = vim.lsp.protocol.make_client_capabilities()
-- these are using the defaults
local servers = {
'html',
'cssls',
'tsserver',
'clangd',
'bashls',
'cmake',
'yamlls',
'texlab',
'csharp_ls',
'lua_ls',
}
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
capabilities = capabilities,
}
end
local server_with_settings = {
-- "textlsp",
'ltex',
'rust_analyzer',
'basedpyright',
}
for _, lsp in ipairs(server_with_settings) do
lspconfig[lsp].setup(lspsettings[lsp])
end