Add fallback install of rust-analyzer from GitHub

This commit is contained in:
ViViDboarder 2023-07-20 11:14:50 -07:00
parent c077ee967c
commit 8ed18d206d
1 changed files with 6 additions and 0 deletions

View File

@ -76,6 +76,12 @@ function install_language_servers() {
# Rust
if want_lang rust ;then
maybe_run rustup component add rustfmt rust-analysis rust-src clippy rust-analyzer
if ! command_exists rustup ;then
maybe_run release-gitter --git-url "https://github.com/rust-lang/rust-analyzer" \
--map-system Windows=pc-windows-msvc --map-system Linux=unknown-linux-gnu --map-system Darwin=apple-darwin \
--exec "'F={}; gzip -d /tmp/\$F && mv /tmp/\$(echo \$F|sed s/\.gz\$//) ~/bin/rust-analyzer && chmod +x ~/bin/rust-analyzer'" \
"rust-analyzer-{arch}-{system}.gz" /tmp/
fi
fi
# Go