diff options
| author | William Boman <william@redwill.se> | 2021-10-06 15:37:38 +0200 |
|---|---|---|
| committer | William Boman <william@redwill.se> | 2021-10-06 21:47:50 +0200 |
| commit | 9bd478e02cb6cd9a0d670a7e4a33c24bc2bef444 (patch) | |
| tree | a80c00976a4d49043093a3937db31b1507fd8a00 /lua/nvim-lsp-installer | |
| parent | add zls (#121) (diff) | |
| download | mason-9bd478e02cb6cd9a0d670a7e4a33c24bc2bef444.tar mason-9bd478e02cb6cd9a0d670a7e4a33c24bc2bef444.tar.gz mason-9bd478e02cb6cd9a0d670a7e4a33c24bc2bef444.tar.bz2 mason-9bd478e02cb6cd9a0d670a7e4a33c24bc2bef444.tar.lz mason-9bd478e02cb6cd9a0d670a7e4a33c24bc2bef444.tar.xz mason-9bd478e02cb6cd9a0d670a7e4a33c24bc2bef444.tar.zst mason-9bd478e02cb6cd9a0d670a7e4a33c24bc2bef444.zip | |
lemminx: fix std.rename call
Diffstat (limited to 'lua/nvim-lsp-installer')
| -rw-r--r-- | lua/nvim-lsp-installer/servers/zls/init.lua | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/lua/nvim-lsp-installer/servers/zls/init.lua b/lua/nvim-lsp-installer/servers/zls/init.lua index a8f3c6ff..c9d32790 100644 --- a/lua/nvim-lsp-installer/servers/zls/init.lua +++ b/lua/nvim-lsp-installer/servers/zls/init.lua @@ -8,28 +8,24 @@ local std = require "nvim-lsp-installer.installers.std" local coalesce, when = Data.coalesce, Data.when return function(name, root_dir) + local archive_name = coalesce( + when(platform.is_mac and platform.arch == "x64", "x86_64-macos"), + when( + platform.is_linux, + coalesce(when(platform.arch == "x64", "x86_64-linux"), when(platform.arch == "x86", "i386-linux.tar.zx")) + ), + when(platform.is_win and platform.arch == "x64", "x86_64-windows") + ) + return server.Server:new { name = name, root_dir = root_dir, installer = { - context.github_release_file( - "zigtools/zls", - coalesce( - when(platform.is_mac and platform.arch == "x64", "x86_64-macos.tar.xz"), - when( - platform.is_linux, - coalesce( - when(platform.arch == "x64", "x86_64-linux.tar.xz"), - when(platform.arch == "x86", "i386-linux.tar.zx") - ) - ), - when(platform.is_win and platform.arch == "x64", "x86_64-windows.tar.xz") - ) - ), + context.github_release_file("zigtools/zls", ("%s.tar.xz"):format(archive_name)), context.capture(function(ctx) return std.untarxz_remote(ctx.github_release_file) end), - std.rename("x86_64-windows", "package"), + std.rename(archive_name, "package"), }, default_options = { cmd = { path.concat { root_dir, "package", "zls" } }, |
