dotfiles/symlinks/config/nvim/lua/esensar/lsp/servers.lua

72 lines
1.4 KiB
Lua
Raw Normal View History

2021-02-23 11:27:32 +00:00
-------------------------------------------------------------------------------
-- - LSP servers configuration -
-------------------------------------------------------------------------------
local lspconfig = require("lspconfig")
require("nvim-lsp-installer").setup({})
local common_config = require("esensar.lsp.server_config")
2022-05-09 09:33:44 +00:00
-- Language specific LSP config overrides
local configuration_overrides = {
gdscript = {
flags = {
-- Slow Godot LS
debounce_text_changes = 600,
2022-05-09 11:14:19 +00:00
},
2022-05-09 09:33:44 +00:00
},
omnisharp = {
cmd = {
vim.fn.glob("$HOME") .. "/lsp/dotnet/omnisharp/run",
"--languageserver",
"--hostPID",
2022-05-09 11:14:19 +00:00
tostring(vim.fn.getpid()),
2022-05-09 09:33:44 +00:00
},
},
lemminx = {
2022-05-09 11:14:19 +00:00
cmd = { "lemminx" },
},
2022-05-09 09:33:44 +00:00
}
2021-10-08 14:28:07 +00:00
2021-02-24 14:13:56 +00:00
-- Lsp default language servers
local servers = {
2022-04-28 13:53:54 +00:00
"bashls",
"clangd",
"clojure_lsp",
"cmake",
"crystalline",
"cucumber_language_server",
"dockerls",
2022-05-09 09:33:44 +00:00
"gdscript",
2022-04-28 13:53:54 +00:00
"gopls",
"hls",
"jsonls",
"kotlin_language_server",
2022-05-09 09:33:44 +00:00
"lemminx",
2022-04-28 13:53:54 +00:00
"mint",
2022-05-09 09:33:44 +00:00
"omnisharp",
2022-04-28 13:53:54 +00:00
"pyright",
"rust_analyzer",
"solang",
"terraformls",
"tsserver",
"vimls",
2022-04-30 21:18:43 +00:00
"zls",
}
2021-02-24 14:13:56 +00:00
for _, lsp in ipairs(servers) do
2022-05-09 11:14:19 +00:00
lspconfig[lsp].setup(vim.tbl_extend("force", common_config, configuration_overrides[lsp] or {}))
2021-02-23 11:27:32 +00:00
end
-- Lua bultin lsp
2022-05-09 11:14:19 +00:00
require("nlua.lsp.nvim").setup(
lspconfig,
vim.tbl_extend("force", common_config, {
-- Tell LSP which globals should be considered real
globals = {},
})
)
2021-03-17 19:34:03 +00:00
-- Flutter tools
2022-04-28 13:53:54 +00:00
require("flutter-tools").setup({
2022-05-09 11:14:19 +00:00
lsp = common_config,
2022-04-28 13:53:54 +00:00
})