2024-01-19 22:34:37 +01:00
|
|
|
local on_attach = require("plugins.configs.lspconfig").on_attach
|
|
|
|
local capabilities = require("plugins.configs.lspconfig").capabilities
|
|
|
|
|
|
|
|
local lspconfig = require "lspconfig"
|
2024-03-12 19:37:42 +01:00
|
|
|
local lspsettings = require "custom.configs.lspsettings"
|
2024-01-19 22:34:37 +01:00
|
|
|
|
|
|
|
-- if you just want default config for the servers then put them in a table
|
2024-01-20 16:22:40 +01:00
|
|
|
local servers = {
|
|
|
|
"html",
|
|
|
|
"cssls",
|
|
|
|
"tsserver",
|
|
|
|
}
|
2024-01-19 22:34:37 +01:00
|
|
|
|
|
|
|
for _, lsp in ipairs(servers) do
|
|
|
|
lspconfig[lsp].setup {
|
|
|
|
on_attach = on_attach,
|
|
|
|
capabilities = capabilities,
|
|
|
|
}
|
|
|
|
end
|
2024-02-16 15:53:23 +01:00
|
|
|
|
2024-03-12 19:37:42 +01:00
|
|
|
local server_with_settings = {
|
|
|
|
-- "textlsp",
|
2024-05-29 12:01:59 +02:00
|
|
|
-- "ltex",
|
|
|
|
-- "rust_analyzer",
|
2024-02-16 15:53:23 +01:00
|
|
|
}
|
2024-03-12 11:33:07 +01:00
|
|
|
|
2024-03-12 19:37:42 +01:00
|
|
|
for _, lsp in ipairs(server_with_settings) do
|
|
|
|
lspconfig[lsp].setup(lspsettings[lsp])
|
|
|
|
end
|