37 lines
754 B
Lua
37 lines
754 B
Lua
local on_attach = require("plugins.configs.lspconfig").on_attach
|
|
local capabilities = require("plugins.configs.lspconfig").capabilities
|
|
|
|
local lspconfig = require "lspconfig"
|
|
local lspsettings = require "custom.configs.lspsettings"
|
|
|
|
-- if you just want default config for the servers then put them in a table
|
|
local servers = {
|
|
"html",
|
|
"cssls",
|
|
"tsserver",
|
|
"clangd",
|
|
"bashls",
|
|
"cmake",
|
|
"yamlls",
|
|
"texlab",
|
|
"csharp_ls",
|
|
}
|
|
|
|
for _, lsp in ipairs(servers) do
|
|
lspconfig[lsp].setup {
|
|
on_attach = on_attach,
|
|
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
|