diff options
| -rw-r--r-- | lua/nvim-lsp-installer/servers/rust_analyzer/install.mjs | 42 |
1 files changed, 31 insertions, 11 deletions
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$/, ""); |
