aboutsummaryrefslogtreecommitdiff
path: root/installer/install-rust-analyzer.sh
diff options
context:
space:
mode:
authorHirokazu Hata <h.hata.ai.t@gmail.com>2020-02-18 22:00:35 +0900
committerHirokazu Hata <h.hata.ai.t@gmail.com>2020-02-18 22:00:35 +0900
commit6198d0512be28fc2eeb6dfa7bf2a18f8c7f31ee3 (patch)
treeb2a855b07ef0c9b5939b885f89523926fa0dff5d /installer/install-rust-analyzer.sh
parent40fa3b6cbb9c20786cba8b998e03326724ad8253 (diff)
downloadvim-lsp-settings-6198d0512be28fc2eeb6dfa7bf2a18f8c7f31ee3.tar.gz
vim-lsp-settings-6198d0512be28fc2eeb6dfa7bf2a18f8c7f31ee3.tar.bz2
vim-lsp-settings-6198d0512be28fc2eeb6dfa7bf2a18f8c7f31ee3.zip
rust-analyzer: add rust-analyzer
I think it's better to keep ra_lsp_server for a while as a user transition period, so I add rust-analyzer instead of rename.
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