diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-02-25 22:07:40 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-02-25 22:07:40 +0900 |
commit | 4b216f58f1d1718219164f617111022a38f1cba7 (patch) | |
tree | 6bb2fa8d483c391b1c9e23618c6678f90065e777 | |
parent | 1ae6dff3ff3057967f602fc3a692c6f454d1a46d (diff) | |
parent | 4fe1667d731e2869ac7e005cfd72fba3f625fdc1 (diff) | |
download | vim-lsp-settings-4b216f58f1d1718219164f617111022a38f1cba7.tar.gz vim-lsp-settings-4b216f58f1d1718219164f617111022a38f1cba7.tar.bz2 vim-lsp-settings-4b216f58f1d1718219164f617111022a38f1cba7.zip |
Merge branch 'master' of git://github.com/mattn/vim-lsp-settings
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | installer/install-eslint-language-server.cmd | 25 | ||||
-rwxr-xr-x | installer/install-eslint-language-server.sh | 11 | ||||
-rw-r--r-- | installer/install-rust-analyzer.cmd | 2 | ||||
-rwxr-xr-x | installer/install-rust-analyzer.sh | 2 | ||||
-rw-r--r-- | settings.json | 33 | ||||
-rw-r--r-- | settings/eslint-language-server.vim | 33 |
7 files changed, 64 insertions, 44 deletions
@@ -66,8 +66,10 @@ Currently, no way to uninstall/update server. Run this command again, newer vers | C# | omnisharp | Yes | | Clojure | clojure-lsp | Yes | | TypeScript | typescript-language-server | Yes | +| TypeScript | eslint-language-server | Yes | | JavaScript | typescript-language-server | Yes | | JavaScript | javascript-typescript-stdio | Yes | +| JavaScript | eslint-language-server | Yes | | Python | pyls | Yes | | Python | pyls-ms (Microsoft Version) | Yes | | Rust | rls | No | diff --git a/installer/install-eslint-language-server.cmd b/installer/install-eslint-language-server.cmd index 846638d..1e3608f 100644 --- a/installer/install-eslint-language-server.cmd +++ b/installer/install-eslint-language-server.cmd @@ -1,13 +1,12 @@ -@echo off - -git clone "https://github.com/microsoft/vscode-eslint" . -git checkout release/1.9.1 -call npm install -call npm run compile:server - -echo @echo off ^ - -node %%~dp0\server\out\eslintServer.js --stdio %%* ^ - -> eslint-language-server.cmd - +@echo off
+
+curl -L -o "vscode-eslint.vsix" "https://github.com/microsoft/vscode-eslint/releases/download/release%2F2.1.0-next.1/vscode-eslint-2.1.0.vsix"
+call "%~dp0\run_unzip.cmd" vscode-eslint.vsix
+del vscode-eslint.vsix
+
+echo @echo off ^
+
+node %%~dp0\extension\server\out\eslintServer.js --stdio %%* ^
+
+> eslint-language-server.cmd
+
diff --git a/installer/install-eslint-language-server.sh b/installer/install-eslint-language-server.sh index 05beeb3..b188e9f 100755 --- a/installer/install-eslint-language-server.sh +++ b/installer/install-eslint-language-server.sh @@ -1,15 +1,16 @@ #!/usr/bin/env bash -git clone "https://github.com/microsoft/vscode-eslint" . -git checkout release/1.9.1 -npm install -npm run compile:server +url="https://github.com/microsoft/vscode-eslint/releases/download/release%2F2.1.0-next.1/vscode-eslint-2.1.0.vsix" +asset="vscode-eslint.vsix" +curl -L "$url" -o "$asset" +unzip "$asset" +rm "$asset" cat <<EOF >eslint-language-server #!/usr/bin/env bash DIR=\$(cd \$(dirname \$0); pwd) -node \$DIR/server/out/eslintServer.js --stdio \$* +node \$DIR/extension/server/out/eslintServer.js --stdio \$* EOF chmod +x eslint-language-server diff --git a/installer/install-rust-analyzer.cmd b/installer/install-rust-analyzer.cmd index f204545..083bba2 100644 --- a/installer/install-rust-analyzer.cmd +++ b/installer/install-rust-analyzer.cmd @@ -1,5 +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"
+curl -L -o rust-analyzer-windows.exe "https://github.com/rust-analyzer/rust-analyzer/releases/download/2020-02-24/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 index fc0afb1..fa5a291 100755 --- a/installer/install-rust-analyzer.sh +++ b/installer/install-rust-analyzer.sh @@ -13,7 +13,7 @@ darwin) ;; esac -version="2020-02-18" +version="2020-02-24" 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 diff --git a/settings.json b/settings.json index a5c8df4..2a6a377 100644 --- a/settings.json +++ b/settings.json @@ -238,7 +238,7 @@ { "command": "html-languageserver", "config": { - "refresh_pattern": "\\(/\\|k\\+\\)$" + "refresh_pattern": "\\(/\\|\\k\\+\\)$" }, "requires": [ "npm" @@ -277,12 +277,10 @@ { "command": "eslint-language-server", "requires": [ - "git", - "npm" + "node" ], "root_uri_patterns": [ - "package.json", - "tsconfig.json" + "package.json" ] } ], @@ -293,8 +291,16 @@ "npm" ], "root_uri_patterns": [ - "package.json", - "tsconfig.json" + "package.json" + ] + }, + { + "command": "eslint-language-server", + "requires": [ + "node" + ], + "root_uri_patterns": [ + "package.json" ] }, { @@ -638,8 +644,7 @@ { "command": "eslint-language-server", "requires": [ - "git", - "npm" + "node" ], "root_uri_patterns": [ "package.json", @@ -657,6 +662,16 @@ "package.json", "tsconfig.json" ] + }, + { + "command": "eslint-language-server", + "requires": [ + "node" + ], + "root_uri_patterns": [ + "package.json", + "tsconfig.json" + ] } ], "vim": [ diff --git a/settings/eslint-language-server.vim b/settings/eslint-language-server.vim index 7377846..f27406c 100644 --- a/settings/eslint-language-server.vim +++ b/settings/eslint-language-server.vim @@ -5,28 +5,31 @@ augroup vimlsp_settings_eslint_language_server \ 'cmd': {server_info->lsp_settings#get('eslint-language-server', 'cmd', [lsp_settings#exec_path('eslint-language-server'), '--stdio'])}, \ 'root_uri':{server_info->lsp_settings#get('eslint-language-server', 'root_uri', lsp_settings#root_uri('eslint-language-server'))}, \ 'initialization_options': lsp_settings#get('eslint-language-server', 'initialization_options', {'diagnostics': 'true'}), - \ 'whitelist': lsp_settings#get('eslint-language-server', 'whitelist', ['javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'typescript.tsx']), + \ 'whitelist': lsp_settings#get('eslint-language-server', 'whitelist', ['javascript', 'javascriptreact', 'typescript', 'typescriptreact']), \ 'blacklist': lsp_settings#get('eslint-language-server', 'blacklist', []), \ 'config': lsp_settings#get('eslint-language-server', 'config', lsp_settings#server_config('eslint-language-server')), - \ 'workspace_config': { - \ 'validate': v:true, + \ 'workspace_config': lsp_settings#get('eslint-language-server', 'workspace_config', { + \ 'validate': 'probe', \ 'packageManager': 'npm', - \ 'autoFix': v:true, - \ 'autoFixOnSave': v:true, - \ 'options': {}, - \ 'run': 'onType', - \ 'nodePath': v:null, - \ 'quiet': v:false, - \ 'workspaceFolder': v:null, + \ 'codeActionOnSave': { + \ 'enable': v:true, + \ 'mode': 'all', + \ }, \ 'codeAction': { \ 'disableRuleComment': { \ 'enable': v:true, - \ 'location': 'separateLine' + \ 'location': 'separateLine', \ }, \ 'showDocumentation': { - \ 'enable': v:true - \ } - \ } - \ }, + \ 'enable': v:true, + \ }, + \ }, + \ 'format': v:false, + \ 'quiet': v:false, + \ 'onIgnoredFiles': 'off', + \ 'options': {}, + \ 'run': 'onType', + \ 'nodePath': v:null, + \ }), \ } augroup END |