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.lua24
1 files changed, 22 insertions, 2 deletions
diff --git a/lua/alpha/lsp/servers.lua b/lua/alpha/lsp/servers.lua
index 926ed7e..028b4b2 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,