From 0d1c52e0818ecc3e1ff68297959f5475d55f4085 Mon Sep 17 00:00:00 2001 From: William Boman Date: Sat, 12 Jun 2021 00:59:51 +0200 Subject: rust_analyzer: upgrade version to 2021-06-07 (#25) --- .../servers/rust_analyzer/install.mjs | 42 ++++++++++++++++------ 1 file changed, 31 insertions(+), 11 deletions(-) (limited to 'lua') diff --git a/lua/nvim-lsp-installer/servers/rust_analyzer/install.mjs b/lua/nvim-lsp-installer/servers/rust_analyzer/install.mjs index d6a9c218..b5665528 100644 --- a/lua/nvim-lsp-installer/servers/rust_analyzer/install.mjs +++ b/lua/nvim-lsp-installer/servers/rust_analyzer/install.mjs @@ -1,17 +1,37 @@ -const VERSION = "2021-05-10"; +const VERSION = "2021-06-07"; + +const exitNotSupported = () => { + console.error( + chalk.red(`${os.platform()} ${os.arch()} is currently not supported.`) + ); + process.exit(1); +}; const target = (() => { - switch (os.platform()) { - case "darwin": - return "rust-analyzer-mac.gz"; - case "win32": { - console.error(chalk.red("Windows not currently supported.")); - process.exit(1); - break; + switch (os.platform()) { + case "darwin": + switch (os.arch()) { + case "arm64": + return "rust-analyzer-aarch64-apple-darwin.gz"; + case "x64": + return "rust-analyzer-x86_64-apple-darwin.gz"; + default: { + exitNotSupported(); + break; + } + } + case "win32": { + exitNotSupported(); + break; + } + default: + switch (os.arch()) { + case "arm64": + return "rust-analyzer-aarch64-unknown-linux-gnu.gz"; + default: + return "rust-analyzer-x86_64-unknown-linux-gnu.gz"; + } } - default: - return "rust-analyzer-linux.gz"; - } })(); const unpackedTarget = target.replace(/\.gz$/, ""); -- cgit v1.2.3-70-g09d2