diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-lsp-installer/servers/erlangls/init.lua | 14 |
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", + }, }, }, } |
