summaryrefslogtreecommitdiff
path: root/lua/lsp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lsp.lua')
-rw-r--r--lua/lsp.lua122
1 files changed, 22 insertions, 100 deletions
diff --git a/lua/lsp.lua b/lua/lsp.lua
index 93159a5..d66e5ab 100644
--- a/lua/lsp.lua
+++ b/lua/lsp.lua
@@ -1,71 +1,33 @@
--- CiderLSP
local vim = assert(vim)
--- 1. Configure CiderLSP
--- Set desired filetypes from go/ciderlsp#supported
--- To list all filetype names, see https://vi.stackexchange.com/a/14990
local nvim_lsp = require("lspconfig")
-local configs = require("lspconfig.configs")
-configs.lualsp = {
- default_config = {
- cmd = { "lua-language-server" },
- filetypes = { "lua" },
- settings = {},
- root_dir = nvim_lsp.util.root_pattern(""),
- },
-}
-
-configs.clangd = {
- default_config = {
- cmd = { "clangd" },
- filetypes = { "c", "cpp" },
- settings = {},
- root_dir = nvim_lsp.util.root_pattern({"Makefile", "CMakeLists.txt", ""}),
- },
-}
-
-configs.hls = {
- default_config = {
- cmd = { "haskell-language-server-wrapper", "--lsp" },
- filetypes = { "haskell" },
- settings = {
- haskell = {
- plugin = {
- semanticTokens = {
- globalOn = true
- }
+nvim_lsp.perlpls.setup {}
+nvim_lsp.lua_ls.setup {}
+nvim_lsp.clangd.setup {}
+nvim_lsp.bashls.setup {}
+nvim_lsp.rust_analyzer.setup {}
+nvim_lsp.vimls.setup {}
+nvim_lsp.hls.setup {
+ settings = {
+ haskell = {
+ plugin = {
+ semanticTokens = {
+ globalOn = true
}
}
- },
- root_dir = nvim_lsp.util.root_pattern("package.yaml"),
- }
-}
-
-configs.pylsp = {
- default_config = {
- cmd = { 'pylsp' },
- filetypes = { "python" },
- settings = {},
- root_dir = nvim_lsp.util.root_pattern(""),
- }
-}
-
-configs.bash = {
- default_config = {
- cmd = { 'bash-language-server', 'start' },
- filetypes = { "sh", "bash", "zsh" },
- settings = {},
- root_dir = nvim_lsp.util.root_pattern(""),
+ }
}
}
-
-configs.rust_analyzer = {
- default_config = {
- cmd = { 'rust-analyzer' },
- filetypes = { 'rust' },
- settings = {},
- root_dir = nvim_lsp.util.root_pattern("Cargo.toml"),
+nvim_lsp.pylsp.setup {
+ settings = {
+ pylsp = {
+ plugins = {
+ pycodestyle = {
+ enabled = false
+ }
+ }
+ }
}
}
@@ -196,7 +158,6 @@ cmp.setup({
{ name = "path" },
{ name = "vim_vsnip" },
{ name = "buffer", keyword_length = 5 },
- com
},
sorting = {
@@ -262,45 +223,6 @@ M.on_attach = function(client, bufnr)
vim.opt_local.signcolumn = 'yes'
end
-nvim_lsp.lualsp.setup({
- capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()),
- on_attach = M.on_attach,
-})
-
-nvim_lsp.clangd.setup({
- capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()),
- on_attach = M.on_attach,
-})
-
-nvim_lsp.hls.setup({
- capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()),
- on_attach = M.on_attach,
-})
-
-nvim_lsp.pylsp.setup({
- capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()),
- on_attach = M.on_attach,
- settings = {
- pylsp = {
- plugins = {
- pycodestyle = {
- enabled = false
- }
- }
- }
- }
-})
-
-nvim_lsp.bash.setup({
- capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()),
- on_attach = M.on_attach,
-})
-
-nvim_lsp.rust_analyzer.setup({
- capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()),
- on_attach = M.on_attach,
-})
-
vim.cmd[[hi DiagnosticUnderlineError gui=undercurl guisp=salmon]]
vim.cmd[[hi DiagnosticUnderlineWarn gui=undercurl guisp=gold]]