aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-12-05 23:24:11 +0100
committerWilliam Boman <william@redwill.se>2021-12-05 23:24:11 +0100
commit167e8ea965a5110f1ed8bd0985eae915de58340b (patch)
treee59679eb73725a5920ffb85ed83f12a545536d75 /lua/nvim-lsp-installer/servers
parentserve_d: remove pinned latest version (diff)
downloadmason-167e8ea965a5110f1ed8bd0985eae915de58340b.tar
mason-167e8ea965a5110f1ed8bd0985eae915de58340b.tar.gz
mason-167e8ea965a5110f1ed8bd0985eae915de58340b.tar.bz2
mason-167e8ea965a5110f1ed8bd0985eae915de58340b.tar.lz
mason-167e8ea965a5110f1ed8bd0985eae915de58340b.tar.xz
mason-167e8ea965a5110f1ed8bd0985eae915de58340b.tar.zst
mason-167e8ea965a5110f1ed8bd0985eae915de58340b.zip
erlangls: use rebar3 cmd consistently
Diffstat (limited to 'lua/nvim-lsp-installer/servers')
-rw-r--r--lua/nvim-lsp-installer/servers/erlangls/init.lua14
1 files changed, 10 insertions, 4 deletions
diff --git a/lua/nvim-lsp-installer/servers/erlangls/init.lua b/lua/nvim-lsp-installer/servers/erlangls/init.lua
index d5273a5d..9815a506 100644
--- a/lua/nvim-lsp-installer/servers/erlangls/init.lua
+++ b/lua/nvim-lsp-installer/servers/erlangls/init.lua
@@ -6,7 +6,8 @@ local context = require "nvim-lsp-installer.installers.context"
local platform = require "nvim-lsp-installer.platform"
return function(name, root_dir)
- local erlang_ls_file_ext = platform.is_win and ".cmd" or ""
+ local rebar3 = platform.is_win and "rebar3.cmd" or "rebar3"
+
return server.Server:new {
name = name,
root_dir = root_dir,
@@ -14,7 +15,7 @@ return function(name, root_dir)
homepage = "https://erlang-ls.github.io/",
installer = {
std.ensure_executables {
- { "rebar3", "rebar3 was not found in path. Refer to http://rebar3.org/docs/." },
+ { rebar3, ("%s was not found in path. Refer to http://rebar3.org/docs/."):format(rebar3) },
},
context.use_github_release "erlang-ls/erlang_ls",
std.git_clone "https://github.com/erlang-ls/erlang_ls.git",
@@ -23,7 +24,6 @@ return function(name, root_dir)
cwd = ctx.install_dir,
stdio_sink = ctx.stdio_sink,
}
- local rebar3 = platform.is_win and "rebar3.cmd" or "rebar3"
c.run(rebar3, { "escriptize" })
c.run(rebar3, { "as", "dap", "escriptize" })
c.spawn(callback)
@@ -31,7 +31,13 @@ return function(name, root_dir)
},
default_options = {
cmd = {
- path.concat { root_dir, "_build", "default", "bin", ("erlang_ls%s"):format(erlang_ls_file_ext) },
+ path.concat {
+ root_dir,
+ "_build",
+ "default",
+ "bin",
+ platform.is_win and "erlang_ls.cmd" or "erlang_ls",
+ },
},
},
}