aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/solargraph/init.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-05-17 14:37:13 +0200
committerGitHub <noreply@github.com>2021-05-17 14:37:13 +0200
commitae93866358777fcf6766152dd55980c4778f4c59 (patch)
treea1b36ba2e2aa09688c4cb96b645b03c34b728042 /lua/nvim-lsp-installer/servers/solargraph/init.lua
parentremove :LspInstallAll (diff)
downloadmason-ae93866358777fcf6766152dd55980c4778f4c59.tar
mason-ae93866358777fcf6766152dd55980c4778f4c59.tar.gz
mason-ae93866358777fcf6766152dd55980c4778f4c59.tar.bz2
mason-ae93866358777fcf6766152dd55980c4778f4c59.tar.lz
mason-ae93866358777fcf6766152dd55980c4778f4c59.tar.xz
mason-ae93866358777fcf6766152dd55980c4778f4c59.tar.zst
mason-ae93866358777fcf6766152dd55980c4778f4c59.zip
add support for zx install scripts (#13)
Diffstat (limited to 'lua/nvim-lsp-installer/servers/solargraph/init.lua')
-rw-r--r--lua/nvim-lsp-installer/servers/solargraph/init.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/lua/nvim-lsp-installer/servers/solargraph/init.lua b/lua/nvim-lsp-installer/servers/solargraph/init.lua
new file mode 100644
index 00000000..b808d917
--- /dev/null
+++ b/lua/nvim-lsp-installer/servers/solargraph/init.lua
@@ -0,0 +1,19 @@
+local server = require("nvim-lsp-installer.server")
+local path = require("nvim-lsp-installer.path")
+local zx = require("nvim-lsp-installer.installers.zx")
+
+local root_dir = server.get_server_root_path("ruby")
+
+return server.Server:new {
+ name = "solargraph",
+ root_dir = root_dir,
+ install_cmd = zx.file("./install.mjs"),
+ pre_install_check = function ()
+ if vim.fn.executable("bundle") ~= 1 then
+ error("bundle not installed")
+ end
+ end,
+ default_options = {
+ cmd = { path.concat { root_dir, "solargraph", "solargraph" }, "stdio" },
+ }
+}