aboutsummaryrefslogtreecommitdiff
path: root/installer/install-rust-analyzer.sh
diff options
context:
space:
mode:
Diffstat (limited to 'installer/install-rust-analyzer.sh')
-rwxr-xr-xinstaller/install-rust-analyzer.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/installer/install-rust-analyzer.sh b/installer/install-rust-analyzer.sh
new file mode 100755
index 0000000..fc0afb1
--- /dev/null
+++ b/installer/install-rust-analyzer.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+set -e
+
+os=$(uname -s | tr "[:upper:]" "[:lower:]")
+
+case $os in
+linux)
+ platform="linux"
+ ;;
+darwin)
+ platform="mac"
+ ;;
+esac
+
+version="2020-02-18"
+curl -L -o ra_lsp_server-$platform "https://github.com/rust-analyzer/rust-analyzer/releases/download/$version/rust-analyzer-$platform"
+
+mv rust-analyzer-$platform rust-analyzer
+chmod +x rust-analyzer