diff options
| author | William Boman <william@redwill.se> | 2021-06-12 00:59:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-12 00:59:51 +0200 |
| commit | 0d1c52e0818ecc3e1ff68297959f5475d55f4085 (patch) | |
| tree | 70eaf63bdf05ebe45c866f0a42308eef19f63267 /lua | |
| parent | Revert "rust_analyzer: upgrade version to 2021-06-07" (diff) | |
| download | mason-0d1c52e0818ecc3e1ff68297959f5475d55f4085.tar mason-0d1c52e0818ecc3e1ff68297959f5475d55f4085.tar.gz mason-0d1c52e0818ecc3e1ff68297959f5475d55f4085.tar.bz2 mason-0d1c52e0818ecc3e1ff68297959f5475d55f4085.tar.lz mason-0d1c52e0818ecc3e1ff68297959f5475d55f4085.tar.xz mason-0d1c52e0818ecc3e1ff68297959f5475d55f4085.tar.zst mason-0d1c52e0818ecc3e1ff68297959f5475d55f4085.zip | |
rust_analyzer: upgrade version to 2021-06-07 (#25)
Diffstat (limited to 'lua')
| -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$/, ""); |
