aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2020-01-29 00:51:36 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2020-01-29 00:51:36 +0900
commitdc70753d70f0bd9891a562c76200fdfcdad1fe4b (patch)
treec46d8744711ce3c88dfc3b771a005e01d48e503f
parent214d1192c8b1911e9c6b441f3acdfd6f9afe2467 (diff)
parentba7d4fd8a0af3b16eda2db3d1ca54f09e163ed4a (diff)
downloadvim-lsp-settings-dc70753d70f0bd9891a562c76200fdfcdad1fe4b.tar.gz
vim-lsp-settings-dc70753d70f0bd9891a562c76200fdfcdad1fe4b.tar.bz2
vim-lsp-settings-dc70753d70f0bd9891a562c76200fdfcdad1fe4b.zip
Merge branch 'master' into add-uninstall
-rw-r--r--installer/install-ra_lsp_server.cmd5
-rwxr-xr-xinstaller/install-ra_lsp_server.sh18
-rw-r--r--settings.json4
-rw-r--r--settings/ra_lsp_server.vim13
4 files changed, 40 insertions, 0 deletions
diff --git a/installer/install-ra_lsp_server.cmd b/installer/install-ra_lsp_server.cmd
new file mode 100644
index 0000000..19e063c
--- /dev/null
+++ b/installer/install-ra_lsp_server.cmd
@@ -0,0 +1,5 @@
+@echo off
+
+curl -L -o ra_lsp_server-windows.exe "https://github.com/rust-analyzer/rust-analyzer/releases/download/2020-01-27/ra_lsp_server-windows.exe"
+
+move ra_lsp_server-windows.exe ra_lsp_server.exe
diff --git a/installer/install-ra_lsp_server.sh b/installer/install-ra_lsp_server.sh
new file mode 100755
index 0000000..9e37113
--- /dev/null
+++ b/installer/install-ra_lsp_server.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+os=$(uname -s | tr "[:upper:]" "[:lower:]")
+
+case $os in
+ linux)
+ platform="linux"
+ ;;
+ darwin)
+ platform="mac"
+ ;;
+esac
+
+curl -L -o ra_lsp_server-$platform "https://github.com/rust-analyzer/rust-analyzer/releases/download/2020-01-27/ra_lsp_server-$platform"
+
+mv ra_lsp_server-$platform ra_lsp_server
diff --git a/settings.json b/settings.json
index c83cdb1..3878bee 100644
--- a/settings.json
+++ b/settings.json
@@ -357,6 +357,10 @@
{
"command": "rls",
"requires": []
+ },
+ {
+ "command": "ra_lsp_server",
+ "requires": []
}
],
"sass": [
diff --git a/settings/ra_lsp_server.vim b/settings/ra_lsp_server.vim
new file mode 100644
index 0000000..5965e7e
--- /dev/null
+++ b/settings/ra_lsp_server.vim
@@ -0,0 +1,13 @@
+augroup vimlsp_settings_ra_lsp_server
+ au!
+ LspRegisterServer {
+ \ 'name': 'ra_lsp_server',
+ \ 'cmd': {server_info->lsp_settings#get('ra_lsp_server', 'cmd', [lsp_settings#exec_path('ra_lsp_server')])},
+ \ 'root_uri':{server_info->lsp_settings#get('ra_lsp_server', 'root_uri', lsp_settings#root_uri(g:lsp_settings_root_markers))},
+ \ 'initialization_options': lsp_settings#get('ra_lsp_server', 'initialization_options', v:null),
+ \ 'whitelist': lsp_settings#get('ra_lsp_server', 'whitelist', ['rust']),
+ \ 'blacklist': lsp_settings#get('ra_lsp_server', 'blacklist', []),
+ \ 'config': lsp_settings#get('ra_lsp_server', 'config', {}),
+ \ 'workspace_config': lsp_settings#get('ra_lsp_server', 'workspace_config', {}),
+ \ }
+augroup END