mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-24 02:34:52 +00:00
rust-analyzer automation
This commit is contained in:
parent
c2b8c29299
commit
76fd99dd2b
@ -30,15 +30,16 @@ download_rust_analyzer() {
|
||||
}
|
||||
|
||||
install_cargos() {
|
||||
programs=(
|
||||
cargo-edit
|
||||
cargo-whatfeatures
|
||||
jql
|
||||
toml-cli
|
||||
)
|
||||
for i in "${programs[@]}"; do
|
||||
cargo install "$i"
|
||||
set -- \
|
||||
'cargo-edit'
|
||||
'cargo-whatfeatures' \
|
||||
'jql' \
|
||||
'toml-cli'
|
||||
for program do
|
||||
cargo install "$program"
|
||||
done
|
||||
|
||||
echo "cargos ✓"
|
||||
}
|
||||
|
||||
install_rust
|
||||
|
19
scripts/update_rust_analyzer
Executable file
19
scripts/update_rust_analyzer
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
update_rust_analyzer() {
|
||||
if ! (which rust-analyzer > /dev/null)
|
||||
then
|
||||
echo "not installed"
|
||||
else
|
||||
echo "removing"
|
||||
rm /usr/local/bin/rust-analyzer
|
||||
fi
|
||||
echo "downloading rust analyzer"
|
||||
rust_analyzer_bin=/usr/local/bin/rust-analyzer
|
||||
curl -s -L https://github.com/rust-analyzer/rust-analyzer/releases/latest/download/rust-analyzer-mac -o $rust_analyzer_bin
|
||||
chmod +x $rust_analyzer_bin
|
||||
|
||||
echo "rust-analyzer ✓"
|
||||
}
|
||||
|
||||
update_rust_analyzer
|
Loading…
Reference in New Issue
Block a user