summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--nvim/.config/nvim/lua/tobyvin/lsp/configs.lua123
1 files changed, 65 insertions, 58 deletions
diff --git a/nvim/.config/nvim/lua/tobyvin/lsp/configs.lua b/nvim/.config/nvim/lua/tobyvin/lsp/configs.lua
index 93e206e..14354f8 100644
--- a/nvim/.config/nvim/lua/tobyvin/lsp/configs.lua
+++ b/nvim/.config/nvim/lua/tobyvin/lsp/configs.lua
@@ -10,54 +10,86 @@ local M = {
},
},
},
+ clangd = {},
+ cssls = {},
+ cssmodules_ls = {},
dockerls = {},
- taplo = {},
- yamlls = {
+ gopls = {
+ cmd = {
+ "gopls",
+ "serve",
+ },
settings = {
- yaml = {
- keyOrdering = false,
+ gopls = {
+ analyses = {
+ unusedparams = true,
+ },
+ staticcheck = true,
},
},
},
- tsserver = {},
html = {
init_options = {
provideFormatter = false,
},
},
- cssls = {},
- cssmodules_ls = {},
- clangd = {},
- powershell_es = {},
- pylsp = {},
- perlnavigator = {
- settings = {
- perlnavigator = {
- enableWarnings = false,
- },
- },
- },
jsonls = {
settings = {
json = {
format = {
enable = true,
},
- validate = { enable = true },
+ validate = {
+ enable = true,
+ },
},
},
},
- gopls = {
- cmd = { "gopls", "serve" },
+ lua_ls = {
settings = {
- gopls = {
- analyses = {
- unusedparams = true,
+ Lua = {
+ workspace = {
+ checkThirdParty = false,
},
- staticcheck = true,
+ completion = {
+ callSnippet = "Replace",
+ },
+ diagnostics = {
+ globals = {
+ "vim",
+ },
+ },
+ format = {
+ enable = false,
+ },
+ },
+ },
+ },
+ omnisharp = {
+ -- cmd = { "dotnet", "/home/tobyv/.local/share/nvim/mason/packages/omnisharp/OmniSharp.dll" },
+ cmd = { "omnisharp", "--languageserver", "--hostPID", tostring(vim.fn.getpid()) },
+ on_attach = function(client)
+ -- HACK: https://github.com/OmniSharp/omnisharp-roslyn/issues/2483
+ local tokenModifiers = client.server_capabilities.semanticTokensProvider.legend.tokenModifiers
+ for i, v in ipairs(tokenModifiers) do
+ tokenModifiers[i] = v:gsub(" ", "_"):gsub("-_", "")
+ end
+
+ local tokenTypes = client.server_capabilities.semanticTokensProvider.legend.tokenTypes
+ for i, v in ipairs(tokenTypes) do
+ tokenTypes[i] = v:gsub(" ", "_"):gsub("-_", "")
+ end
+ end,
+ },
+ perlnavigator = {
+ settings = {
+ perlnavigator = {
+ enableWarnings = false,
},
},
},
+ powershell_es = {},
+ pylsp = {},
rust_analyzer = {
standalone = true,
settings = {
@@ -92,40 +124,7 @@ local M = {
},
},
},
- omnisharp = {
- -- cmd = { "dotnet", "/home/tobyv/.local/share/nvim/mason/packages/omnisharp/OmniSharp.dll" },
- cmd = { "omnisharp", "--languageserver", "--hostPID", tostring(vim.fn.getpid()) },
- on_attach = function(client)
- -- HACK: https://github.com/OmniSharp/omnisharp-roslyn/issues/2483
- local tokenModifiers = client.server_capabilities.semanticTokensProvider.legend.tokenModifiers
- for i, v in ipairs(tokenModifiers) do
- tokenModifiers[i] = v:gsub(" ", "_"):gsub("-_", "")
- end
-
- local tokenTypes = client.server_capabilities.semanticTokensProvider.legend.tokenTypes
- for i, v in ipairs(tokenTypes) do
- tokenTypes[i] = v:gsub(" ", "_"):gsub("-_", "")
- end
- end,
- },
- lua_ls = {
- settings = {
- Lua = {
- workspace = {
- checkThirdParty = false,
- },
- completion = {
- callSnippet = "Replace",
- },
- diagnostics = {
- globals = { "vim" },
- },
- format = {
- enable = false,
- },
- },
- },
- },
+ taplo = {},
texlab = {
settings = {
texlab = {
@@ -180,6 +179,14 @@ local M = {
end, { desc = "Texlab preview stop" })
end,
},
+ tsserver = {},
+ yamlls = {
+ settings = {
+ yaml = {
+ keyOrdering = false,
+ },
+ },
+ },
}
return M