aboutsummaryrefslogtreecommitdiffstats
path: root/lua/alpha/lsp/servers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/alpha/lsp/servers.lua')
-rw-r--r--lua/alpha/lsp/servers.lua32
1 files changed, 29 insertions, 3 deletions
diff --git a/lua/alpha/lsp/servers.lua b/lua/alpha/lsp/servers.lua
index f09f523..d2233a1 100644
--- a/lua/alpha/lsp/servers.lua
+++ b/lua/alpha/lsp/servers.lua
@@ -28,8 +28,28 @@ return {
flags = lsp_flags,
}
end,
- ["html"] = default,
- ["jsonls"] = default,
+ ["html"] = function ()
+ local config = {
+ on_attach = lsp_attach,
+ flags = lsp_flags,
+ }
+ if vim.fn.executable("html-languageserver") == 1 then
+ config.cmd = { "html-languageserver", "--stdio" }
+ end
+
+ return config
+ end,
+ ["jsonls"] = function ()
+ local config = {
+ on_attach = lsp_attach,
+ flags = lsp_flags,
+ }
+ if vim.fn.executable("json-languageserver") == 1 then
+ config.cmd = { "json-languageserver", "--stdio" }
+ end
+
+ return config
+ end,
["lua_ls"] = function()
return {
on_attach = lsp_attach,
@@ -51,7 +71,7 @@ return {
},
hint = {
enable = true,
- }
+ },
},
},
}
@@ -63,8 +83,14 @@ return {
on_attach = lsp_attach,
flags = lsp_flags,
filetypes = { "php", "cucumber" },
+ init_options = {
+ ["language_server_worse_reflection.inlay_hints.enable"] = true,
+ -- ["language_server_worse_reflection.inlay_hints.types"] = true,
+ -- ["language_server_worse_reflection.inlay_hints.params"] = true,
+ },
}
end,
+ ["pyright"] = default,
["rust_analyzer"] = function()
return {
on_attach = lsp_attach,