Created
December 4, 2022 06:53
-
-
Save AOx0/00e1116d5e511d8b3fb576fda64ea1fb to your computer and use it in GitHub Desktop.
fish function to create symbolic links to rust-analyzer components for a given toolchain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function set-analyzer --argument toolchain | |
echo "INFO :: Adding rust-analyzer for $toolchain" | |
rustup component add rust-analyzer --toolchain $toolchain | |
set analyzer_path (rustup which rust-analyzer --toolchain $toolchain) | |
echo "INFO :: rust-analyzer for $toolchain at $analyzer_path" | |
echo "INFO :: Adding symbolic link to $HOME/.cargo/bin/rust-analyzer" | |
ln -fP $analyzer_path $HOME/.cargo/bin/rust-analyzer | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment