darkrc/vim/plugin/lsp.lua

26 lines
508 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 {
"html",
"cssls",
"clangd",
"tsserver",
"lua_ls",
"solargraph",
"standardrb",
"zls",
2024-05-17 12:25:52 +00:00
"yamlls" -- bun install --global yaml-language-server
} do
2024-04-29 12:18:56 +00:00
config[language].setup(ensure_capabilities(default))
end