diff options
| author | Iván Giovanazzi <43305758+ivano9@users.noreply.github.com> | 2021-10-12 18:13:44 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-12 23:13:44 +0200 |
| commit | cb36bb9837e7ee2b1b1207ecde0c9c3a74a12d71 (patch) | |
| tree | a943675db8045597e40dd8f7f7e23c5b33358bcc /lua/nvim-lsp-installer/servers | |
| parent | ui: show installer log file path in help window (diff) | |
| download | mason-cb36bb9837e7ee2b1b1207ecde0c9c3a74a12d71.tar mason-cb36bb9837e7ee2b1b1207ecde0c9c3a74a12d71.tar.gz mason-cb36bb9837e7ee2b1b1207ecde0c9c3a74a12d71.tar.bz2 mason-cb36bb9837e7ee2b1b1207ecde0c9c3a74a12d71.tar.lz mason-cb36bb9837e7ee2b1b1207ecde0c9c3a74a12d71.tar.xz mason-cb36bb9837e7ee2b1b1207ecde0c9c3a74a12d71.tar.zst mason-cb36bb9837e7ee2b1b1207ecde0c9c3a74a12d71.zip | |
add-erlangls (#144)
Co-authored-by: William Boman <william@redwill.se>
Diffstat (limited to 'lua/nvim-lsp-installer/servers')
| -rw-r--r-- | lua/nvim-lsp-installer/servers/erlangls/init.lua | 35 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/servers/init.lua | 1 |
2 files changed, 36 insertions, 0 deletions
diff --git a/lua/nvim-lsp-installer/servers/erlangls/init.lua b/lua/nvim-lsp-installer/servers/erlangls/init.lua new file mode 100644 index 00000000..4baa075a --- /dev/null +++ b/lua/nvim-lsp-installer/servers/erlangls/init.lua @@ -0,0 +1,35 @@ +local server = require "nvim-lsp-installer.server" +local path = require "nvim-lsp-installer.path" +local process = require "nvim-lsp-installer.process" +local std = require "nvim-lsp-installer.installers.std" +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 "" + return server.Server:new { + name = name, + root_dir = 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/." }, + }, + context.latest_github_release "erlang-ls/erlang_ls", + std.git_clone "https://github.com/erlang-ls/erlang_ls.git", + function(server, callback, context) + local c = process.chain { + cwd = server.root_dir, + stdio_sink = context.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) + end, + }, + default_options = { + cmd = { path.concat { root_dir, "_build", "default", "bin", ("erlang_ls%s"):format(erlang_ls_file_ext) } }, + }, + } +end diff --git a/lua/nvim-lsp-installer/servers/init.lua b/lua/nvim-lsp-installer/servers/init.lua index 48516442..35c23627 100644 --- a/lua/nvim-lsp-installer/servers/init.lua +++ b/lua/nvim-lsp-installer/servers/init.lua @@ -56,6 +56,7 @@ local CORE_SERVERS = Data.set_of { "elmls", "ember", "emmet_ls", + "erlangls", "eslintls", "fortls", "gopls", |
