diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2023-07-03 19:15:45 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2023-07-03 19:15:45 +0200 |
| commit | 73460ffcdd764556bc3b683f5c14a6846ef48d9a (patch) | |
| tree | 80a7a2d97d53c5e53ce100959a377bf290e30b53 /lua/alpha/lsp/servers.lua | |
| parent | 850f49dee880c6881c53c1decbb6aedf857fec1f (diff) | |
| download | nvim-conf-73460ffcdd764556bc3b683f5c14a6846ef48d9a.tar.gz nvim-conf-73460ffcdd764556bc3b683f5c14a6846ef48d9a.zip | |
update servers to support nixos binaries
Diffstat (limited to 'lua/alpha/lsp/servers.lua')
| -rw-r--r-- | lua/alpha/lsp/servers.lua | 24 |
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, |