darkrc/vim/plugin/lsp.lua

28 lines
535 B
Lua
Raw Normal View History

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)
local default = { on_attach = require 'lsp.attach' }
for _, language in ipairs {
"clangd",
2024-06-24 14:18:04 +00:00
"cssls",
"html",
"lua_ls",
"solargraph",
"standardrb",
2024-06-24 14:18:04 +00:00
"svelte",
"tsserver",
"yamlls", -- bun install --global yaml-language-server
"zls",
2024-06-24 14:18:04 +00:00
-- "ruby_lsp",
} do
2024-04-29 12:18:56 +00:00
config[language].setup(ensure_capabilities(default))
end