diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-02-20 00:08:42 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-02-20 00:08:42 +0900 |
commit | 7ecb6223a7eb1d510c3662e8ca4f7a3b1fd5b3fb (patch) | |
tree | 0ed5ddc1ae43045c8fcd6b1a3c6b98e909e3d3f1 | |
parent | f0a6c9bdaa9c50a058ecc15466ff6e6f6577d482 (diff) | |
parent | 2c1fe5782270140855749eb14f6ac5e9edde425c (diff) | |
download | vim-lsp-settings-7ecb6223a7eb1d510c3662e8ca4f7a3b1fd5b3fb.tar.gz vim-lsp-settings-7ecb6223a7eb1d510c3662e8ca4f7a3b1fd5b3fb.tar.bz2 vim-lsp-settings-7ecb6223a7eb1d510c3662e8ca4f7a3b1fd5b3fb.zip |
Merge branch 'master' of git://github.com/mattn/vim-lsp-settings
-rw-r--r-- | installer/install-rust-analyzer.cmd | 5 | ||||
-rwxr-xr-x | installer/install-rust-analyzer.sh | 20 | ||||
-rw-r--r-- | installer/install-sqls.cmd | 3 | ||||
-rwxr-xr-x | installer/install-sqls.sh | 5 | ||||
-rw-r--r-- | settings.json | 7 | ||||
-rw-r--r-- | settings/rust-analyzer.vim | 13 | ||||
-rw-r--r-- | settings/sqls.vim | 13 |
7 files changed, 66 insertions, 0 deletions
diff --git a/installer/install-rust-analyzer.cmd b/installer/install-rust-analyzer.cmd new file mode 100644 index 0000000..f204545 --- /dev/null +++ b/installer/install-rust-analyzer.cmd @@ -0,0 +1,5 @@ +@echo off
+
+curl -L -o rust-analyzer-windows.exe "https://github.com/rust-analyzer/rust-analyzer/releases/download/2020-02-18/rust-analyzer-windows.exe"
+
+move rust-analyzer-windows.exe rust-analyzer.exe
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 diff --git a/installer/install-sqls.cmd b/installer/install-sqls.cmd new file mode 100644 index 0000000..f649037 --- /dev/null +++ b/installer/install-sqls.cmd @@ -0,0 +1,3 @@ +@echo off
+
+call "%~dp0\go_install.cmd" github.com/lighttiger2505/sqls
diff --git a/installer/install-sqls.sh b/installer/install-sqls.sh new file mode 100755 index 0000000..03f4628 --- /dev/null +++ b/installer/install-sqls.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -e + +"$(dirname "$0")/go_install.sh" github.com/lighttiger2505/sqls diff --git a/settings.json b/settings.json index 943d849..c32a18c 100644 --- a/settings.json +++ b/settings.json @@ -514,6 +514,10 @@ ] }, { + "command": "rust-analyzer", + "requires": [] + }, + { "command": "ra_lsp_server", "requires": [], "root_uri_patterns": [ @@ -556,6 +560,9 @@ ] }, { + "config": { + "refresh_pattern": "\\( \\zs\\k*\\|[a-zA-Z0-9_-]\\+\\)$" + }, "command": "sqls", "requires": [ "go" diff --git a/settings/rust-analyzer.vim b/settings/rust-analyzer.vim new file mode 100644 index 0000000..d07fc1c --- /dev/null +++ b/settings/rust-analyzer.vim @@ -0,0 +1,13 @@ +augroup vimlsp_settings_rust-analyzer + au! + LspRegisterServer { + \ 'name': 'rust-analyzer', + \ 'cmd': {server_info->lsp_settings#get('rust-analyzer', 'cmd', [lsp_settings#exec_path('rust-analyzer')])}, + \ 'root_uri':{server_info->lsp_settings#get('rust-analyzer', 'root_uri', lsp_settings#root_uri(['Cargo.toml']))}, + \ 'initialization_options': lsp_settings#get('rust-analyzer', 'initialization_options', v:null), + \ 'whitelist': lsp_settings#get('rust-analyzer', 'whitelist', ['rust']), + \ 'blacklist': lsp_settings#get('rust-analyzer', 'blacklist', []), + \ 'config': lsp_settings#get('rust-analyzer', 'config', lsp_settings#server_config('rust-analyzer')), + \ 'workspace_config': lsp_settings#get('rust-analyzer', 'workspace_config', {}), + \ } +augroup END diff --git a/settings/sqls.vim b/settings/sqls.vim new file mode 100644 index 0000000..a80e6ab --- /dev/null +++ b/settings/sqls.vim @@ -0,0 +1,13 @@ +augroup vimlsp_settings_sqls + au! + LspRegisterServer { + \ 'name': 'sqls', + \ 'cmd': {server_info->lsp_settings#get('sqls', 'cmd', [lsp_settings#exec_path('sqls')])}, + \ 'root_uri':{server_info->lsp_settings#get('sqls', 'root_uri', lsp_settings#root_uri())}, + \ 'initialization_options': lsp_settings#get('sqls', 'initialization_options', v:null), + \ 'whitelist': lsp_settings#get('sqls', 'whitelist', ['sql']), + \ 'blacklist': lsp_settings#get('sqls', 'blacklist', []), + \ 'config': lsp_settings#get('sqls', 'config', lsp_settings#server_config('sqls')), + \ 'workspace_config': lsp_settings#get('sqls', 'workspace_config', {}), + \ } +augroup END |