2024-02-09 17:53:16 +00:00
|
|
|
local config = require 'lspconfig'
|
|
|
|
|
2024-04-29 12:18:56 +00:00
|
|
|
local ensure_capabilities
|
|
|
|
xpcall(function()
|
|
|
|
ensure_capabilities = require("coq").lsp_ensure_capabilities
|
|
|
|
end, function()
|
|
|
|
function ensure_capabilities(...)
|
|
|
|
return ...
|
|
|
|
end
|
|
|
|
end)
|
|
|
|
|
2024-02-09 17:53:16 +00:00
|
|
|
local default = { on_attach = require 'lsp.attach' }
|
|
|
|
for _, language in ipairs {
|
|
|
|
"html",
|
|
|
|
"cssls",
|
|
|
|
"clangd",
|
|
|
|
"tsserver",
|
|
|
|
"lua_ls",
|
|
|
|
"solargraph",
|
|
|
|
"standardrb",
|
|
|
|
"zls",
|
2024-05-17 12:25:52 +00:00
|
|
|
"yamlls" -- bun install --global yaml-language-server
|
2024-02-09 17:53:16 +00:00
|
|
|
} do
|
2024-04-29 12:18:56 +00:00
|
|
|
config[language].setup(ensure_capabilities(default))
|
2024-02-09 17:53:16 +00:00
|
|
|
end
|