2022-04-14 20:47:22 +02:00
|
|
|
local skipped_servers = {
|
|
|
|
"angularls",
|
|
|
|
"ansiblels",
|
2023-02-17 17:05:08 +01:00
|
|
|
"antlersls",
|
2023-04-28 10:27:40 +02:00
|
|
|
"azure_pipelines_ls",
|
2022-04-14 20:47:22 +02:00
|
|
|
"ccls",
|
2023-04-28 10:31:52 +02:00
|
|
|
"omnisharp",
|
2022-04-14 20:47:22 +02:00
|
|
|
"cssmodules_ls",
|
|
|
|
"denols",
|
2023-02-17 17:05:08 +01:00
|
|
|
"docker_compose_language_service",
|
2022-04-14 20:47:22 +02:00
|
|
|
"ember",
|
|
|
|
"emmet_ls",
|
|
|
|
"eslint",
|
|
|
|
"eslintls",
|
2022-10-29 18:23:34 +02:00
|
|
|
"glint",
|
2022-04-14 20:47:22 +02:00
|
|
|
"golangci_lint_ls",
|
2022-10-15 18:32:11 +02:00
|
|
|
"gradle_ls",
|
2022-04-14 20:47:22 +02:00
|
|
|
"graphql",
|
2023-04-29 13:42:33 +02:00
|
|
|
"java_language_server",
|
2022-04-14 20:47:22 +02:00
|
|
|
"jedi_language_server",
|
|
|
|
"ltex",
|
2022-12-13 16:22:53 +01:00
|
|
|
"neocmake",
|
2022-04-14 20:47:22 +02:00
|
|
|
"ocamlls",
|
|
|
|
"phpactor",
|
|
|
|
"psalm",
|
|
|
|
"pylsp",
|
2023-04-28 10:27:40 +02:00
|
|
|
"pylyzer",
|
2023-02-04 16:43:11 +01:00
|
|
|
"pyre",
|
2022-04-14 20:47:22 +02:00
|
|
|
"quick_lint_js",
|
|
|
|
"reason_ls",
|
2022-12-23 17:07:37 +01:00
|
|
|
"rnix",
|
2022-10-15 18:32:11 +02:00
|
|
|
"rome",
|
|
|
|
"ruby_ls",
|
2023-01-05 10:54:04 +01:00
|
|
|
"ruff_lsp",
|
2022-04-14 20:47:22 +02:00
|
|
|
"scry",
|
|
|
|
"solang",
|
2022-09-27 15:44:19 +02:00
|
|
|
"solc",
|
2022-04-14 20:47:22 +02:00
|
|
|
"solidity_ls",
|
|
|
|
"sorbet",
|
|
|
|
"sourcekit",
|
|
|
|
"sourcery",
|
|
|
|
"spectral",
|
|
|
|
"sqlls",
|
|
|
|
"sqls",
|
2023-04-28 10:27:40 +02:00
|
|
|
"standardrb",
|
2022-04-14 20:47:22 +02:00
|
|
|
"stylelint_lsp",
|
2022-06-11 17:46:37 +02:00
|
|
|
"svlangserver",
|
2022-10-15 18:32:11 +02:00
|
|
|
"tflint",
|
2023-02-10 20:39:42 +01:00
|
|
|
"unocss",
|
2022-04-14 20:47:22 +02:00
|
|
|
"verible",
|
2023-02-04 16:43:11 +01:00
|
|
|
"vtsls",
|
2022-04-14 20:47:22 +02:00
|
|
|
"vuels",
|
|
|
|
}
|
|
|
|
|
2022-10-29 18:23:34 +02:00
|
|
|
local skipped_filetypes = { "markdown", "rst", "plaintext", "toml", "proto" }
|
2022-04-14 20:47:22 +02:00
|
|
|
|
2022-06-27 19:18:20 +02:00
|
|
|
local join_paths = require("lvim.utils").join_paths
|
|
|
|
|
2021-10-03 16:13:46 +02:00
|
|
|
return {
|
|
|
|
templates_dir = join_paths(get_runtime_dir(), "site", "after", "ftplugin"),
|
2023-05-02 09:56:47 +02:00
|
|
|
---@deprecated use vim.diagnostic.config({ ... }) instead
|
|
|
|
diagnostics = {},
|
2022-09-20 11:41:58 +02:00
|
|
|
document_highlight = false,
|
2021-10-06 00:37:23 +02:00
|
|
|
code_lens_refresh = true,
|
2021-10-03 16:13:46 +02:00
|
|
|
on_attach_callback = nil,
|
|
|
|
on_init_callback = nil,
|
2022-04-14 20:47:22 +02:00
|
|
|
automatic_configuration = {
|
|
|
|
---@usage list of servers that the automatic installer will skip
|
|
|
|
skipped_servers = skipped_servers,
|
|
|
|
---@usage list of filetypes that the automatic installer will skip
|
|
|
|
skipped_filetypes = skipped_filetypes,
|
|
|
|
},
|
2021-10-05 21:29:58 +02:00
|
|
|
buffer_mappings = {
|
|
|
|
normal_mode = {
|
2023-02-04 16:22:41 +01:00
|
|
|
["K"] = { "<cmd>lua vim.lsp.buf.hover()<cr>", "Show hover" },
|
2023-03-20 05:25:59 +01:00
|
|
|
["gd"] = { "<cmd>lua vim.lsp.buf.definition()<cr>", "Goto definition" },
|
|
|
|
["gD"] = { "<cmd>lua vim.lsp.buf.declaration()<cr>", "Goto Declaration" },
|
2023-02-04 16:22:41 +01:00
|
|
|
["gr"] = { "<cmd>lua vim.lsp.buf.references()<cr>", "Goto references" },
|
|
|
|
["gI"] = { "<cmd>lua vim.lsp.buf.implementation()<cr>", "Goto Implementation" },
|
|
|
|
["gs"] = { "<cmd>lua vim.lsp.buf.signature_help()<cr>", "show signature help" },
|
2021-10-05 21:29:58 +02:00
|
|
|
["gl"] = {
|
2022-05-03 01:10:51 +02:00
|
|
|
function()
|
2023-05-02 09:56:47 +02:00
|
|
|
local float = vim.diagnostic.config().float
|
|
|
|
|
|
|
|
if float then
|
|
|
|
local config = type(float) == "table" and float or {}
|
|
|
|
config.scope = "line"
|
|
|
|
|
|
|
|
vim.diagnostic.open_float(config)
|
|
|
|
end
|
2022-05-03 01:10:51 +02:00
|
|
|
end,
|
2021-10-05 21:29:58 +02:00
|
|
|
"Show line diagnostics",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
insert_mode = {},
|
|
|
|
visual_mode = {},
|
|
|
|
},
|
2022-07-31 14:27:59 +02:00
|
|
|
buffer_options = {
|
|
|
|
--- enable completion triggered by <c-x><c-o>
|
|
|
|
omnifunc = "v:lua.vim.lsp.omnifunc",
|
|
|
|
--- use gq for formatting
|
|
|
|
formatexpr = "v:lua.vim.lsp.formatexpr(#{timeout_ms:500})",
|
|
|
|
},
|
2022-06-26 14:08:54 +02:00
|
|
|
---@usage list of settings of nvim-lsp-installer
|
|
|
|
installer = {
|
|
|
|
setup = {
|
|
|
|
ensure_installed = {},
|
2022-08-09 10:41:17 +02:00
|
|
|
automatic_installation = {
|
|
|
|
exclude = {},
|
2022-06-26 14:08:54 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-06-27 19:18:20 +02:00
|
|
|
nlsp_settings = {
|
|
|
|
setup = {
|
|
|
|
config_home = join_paths(get_config_dir(), "lsp-settings"),
|
|
|
|
-- set to false to overwrite schemastore.nvim
|
|
|
|
append_default_schemas = true,
|
|
|
|
ignored_servers = {},
|
|
|
|
loader = "json",
|
|
|
|
},
|
|
|
|
},
|
2021-10-04 23:09:40 +02:00
|
|
|
null_ls = {
|
2022-09-28 19:54:12 +02:00
|
|
|
setup = {
|
|
|
|
debug = false,
|
|
|
|
},
|
2021-11-16 15:55:45 +01:00
|
|
|
config = {},
|
2021-10-04 23:09:40 +02:00
|
|
|
},
|
2022-08-09 10:41:17 +02:00
|
|
|
---@deprecated use lvim.lsp.automatic_configuration.skipped_servers instead
|
2022-04-14 20:47:22 +02:00
|
|
|
override = {},
|
2022-08-09 10:41:17 +02:00
|
|
|
---@deprecated use lvim.lsp.installer.setup.automatic_installation instead
|
|
|
|
automatic_servers_installation = nil,
|
2021-10-03 16:13:46 +02:00
|
|
|
}
|