2022-01-22 16:38:51 +01:00
|
|
|
local lspc = require "lspconfig"
|
2022-10-16 14:41:44 +02:00
|
|
|
local caps = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
2022-01-22 16:38:51 +01:00
|
|
|
|
2022-10-24 22:52:58 +02:00
|
|
|
caps.textDocument.foldingRange = {
|
|
|
|
dynamicRegistration = false,
|
|
|
|
lineFoldingOnly = true,
|
|
|
|
}
|
|
|
|
|
2022-11-10 00:02:21 +01:00
|
|
|
local function disableFormatter(client, _)
|
|
|
|
client.server_capabilities.documentFormattingProvider = false
|
|
|
|
end
|
|
|
|
|
2022-01-22 16:38:51 +01:00
|
|
|
local lua_runtime_path = vim.split(package.path, ";")
|
|
|
|
table.insert(lua_runtime_path, "lua/?.lua")
|
|
|
|
table.insert(lua_runtime_path, "lua/?/init.lua")
|
|
|
|
|
2022-11-10 00:02:21 +01:00
|
|
|
lspc.clangd.setup {
|
|
|
|
capabilities = caps,
|
|
|
|
on_attach = disableFormatter,
|
|
|
|
}
|
2022-10-04 20:23:47 +02:00
|
|
|
lspc.cssls.setup { capabilities = caps }
|
2022-11-02 20:10:32 +01:00
|
|
|
lspc.elixirls.setup {
|
|
|
|
capabilities = caps,
|
|
|
|
cmd = { "elixir-ls" },
|
|
|
|
}
|
2022-10-04 20:23:47 +02:00
|
|
|
lspc.eslint.setup { capabilities = caps }
|
|
|
|
lspc.haxe_language_server.setup { capabilities = caps }
|
|
|
|
lspc.html.setup { capabilities = caps }
|
|
|
|
lspc.jsonls.setup { capabilities = caps }
|
|
|
|
lspc.ocamllsp.setup { capabilities = caps }
|
|
|
|
lspc.prosemd_lsp.setup { capabilities = caps }
|
2023-02-11 13:24:42 +01:00
|
|
|
lspc.racket_langserver.setup { capabilities = caps }
|
2022-03-22 12:14:50 +01:00
|
|
|
lspc.rust_analyzer.setup {
|
|
|
|
capabilities = caps,
|
|
|
|
settings = {
|
|
|
|
["rust-analyzer"] = {
|
|
|
|
checkOnSave = {
|
|
|
|
command = "clippy",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2022-02-08 19:53:55 +01:00
|
|
|
lspc.sumneko_lua.setup {
|
2022-01-22 16:38:51 +01:00
|
|
|
capabilities = caps,
|
|
|
|
settings = {
|
|
|
|
Lua = {
|
|
|
|
runtime = {
|
|
|
|
version = "LuaJIT",
|
|
|
|
path = lua_runtime_path,
|
|
|
|
},
|
|
|
|
diagnostics = {
|
|
|
|
globals = { "vim" },
|
|
|
|
},
|
|
|
|
workspace = {
|
|
|
|
vim.api.nvim_get_runtime_file("", true),
|
|
|
|
},
|
|
|
|
telemetry = {
|
|
|
|
enable = false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2022-10-04 20:23:47 +02:00
|
|
|
lspc.taplo.setup { capabilities = caps }
|
|
|
|
lspc.yamlls.setup { capabilities = caps }
|
|
|
|
lspc.zls.setup { capabilities = caps }
|