From 9fa460fcfc233329795fe75ea2f5873cd121a653 Mon Sep 17 00:00:00 2001 From: yaegassy Date: Mon, 24 Feb 2020 23:55:03 +0900 Subject: Update eslint-server (vscode-eslint) to version 2 --- installer/install-eslint-language-server.cmd | 26 ++++++++++----------- installer/install-eslint-language-server.sh | 2 +- settings/eslint-language-server.vim | 35 +++++++++++++++------------- 3 files changed, 33 insertions(+), 30 deletions(-) diff --git a/installer/install-eslint-language-server.cmd b/installer/install-eslint-language-server.cmd index 846638d..4f14a5a 100644 --- a/installer/install-eslint-language-server.cmd +++ b/installer/install-eslint-language-server.cmd @@ -1,13 +1,13 @@ -@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 + +git clone "https://github.com/microsoft/vscode-eslint" . +git checkout release/2.0.15 +call npm install +call npm run compile:server + +echo @echo off ^ + +node %%~dp0\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..21b2673 100755 --- a/installer/install-eslint-language-server.sh +++ b/installer/install-eslint-language-server.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash git clone "https://github.com/microsoft/vscode-eslint" . -git checkout release/1.9.1 +git checkout release/2.0.15 npm install npm run compile:server diff --git a/settings/eslint-language-server.vim b/settings/eslint-language-server.vim index 7377846..9f6a590 100644 --- a/settings/eslint-language-server.vim +++ b/settings/eslint-language-server.vim @@ -8,25 +8,28 @@ augroup vimlsp_settings_eslint_language_server \ 'whitelist': lsp_settings#get('eslint-language-server', 'whitelist', ['javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'typescript.tsx']), \ '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, + \ 'codeActionOnSave': { + \ 'enable': v:true, + \ 'mode': 'all', + \ }, + \ 'codeAction': { + \ 'disableRuleComment': { + \ 'enable': v:true, + \ 'location': 'separateLine', + \ }, + \ 'showDocumentation': { + \ 'enable': v:true, + \ }, + \ }, + \ 'format': v:false, + \ 'quiet': v:false, + \ 'onIgnoredFiles': 'off', \ 'options': {}, \ 'run': 'onType', \ 'nodePath': v:null, - \ 'quiet': v:false, - \ 'workspaceFolder': v:null, - \ 'codeAction': { - \ 'disableRuleComment': { - \ 'enable': v:true, - \ 'location': 'separateLine' - \ }, - \ 'showDocumentation': { - \ 'enable': v:true - \ } - \ } - \ }, + \ }), \ } augroup END -- cgit v1.2.3-54-g00ecf From 77a23c538d471f3ebc7f0cb3d162e8a1b12c9765 Mon Sep 17 00:00:00 2001 From: yaegassy Date: Tue, 25 Feb 2020 00:46:03 +0900 Subject: Workaround for build error due to "Unsupported Platform" in fsevents --- installer/install-eslint-language-server.cmd | 1 + installer/install-eslint-language-server.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/installer/install-eslint-language-server.cmd b/installer/install-eslint-language-server.cmd index 4f14a5a..ee71b53 100644 --- a/installer/install-eslint-language-server.cmd +++ b/installer/install-eslint-language-server.cmd @@ -3,6 +3,7 @@ git clone "https://github.com/microsoft/vscode-eslint" . git checkout release/2.0.15 call npm install +call npm --prefix ./server install ./server call npm run compile:server echo @echo off ^ diff --git a/installer/install-eslint-language-server.sh b/installer/install-eslint-language-server.sh index 21b2673..df6e4f9 100755 --- a/installer/install-eslint-language-server.sh +++ b/installer/install-eslint-language-server.sh @@ -3,6 +3,7 @@ git clone "https://github.com/microsoft/vscode-eslint" . git checkout release/2.0.15 npm install +npm --prefix ./server install ./server npm run compile:server cat <eslint-language-server -- cgit v1.2.3-54-g00ecf From 6ae88c37f5c8a1afc4149c32d7fc03e3898c3d94 Mon Sep 17 00:00:00 2001 From: yaegassy Date: Tue, 25 Feb 2020 00:59:34 +0900 Subject: fix indent --- settings/eslint-language-server.vim | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/settings/eslint-language-server.vim b/settings/eslint-language-server.vim index 9f6a590..f6dd6e3 100644 --- a/settings/eslint-language-server.vim +++ b/settings/eslint-language-server.vim @@ -15,15 +15,15 @@ augroup vimlsp_settings_eslint_language_server \ 'enable': v:true, \ 'mode': 'all', \ }, - \ 'codeAction': { - \ 'disableRuleComment': { - \ 'enable': v:true, - \ 'location': 'separateLine', - \ }, - \ 'showDocumentation': { - \ 'enable': v:true, - \ }, - \ }, + \ 'codeAction': { + \ 'disableRuleComment': { + \ 'enable': v:true, + \ 'location': 'separateLine', + \ }, + \ 'showDocumentation': { + \ 'enable': v:true, + \ }, + \ }, \ 'format': v:false, \ 'quiet': v:false, \ 'onIgnoredFiles': 'off', -- cgit v1.2.3-54-g00ecf From 6ee2cea4d0298876c50745468049cfd0e7dbd4a0 Mon Sep 17 00:00:00 2001 From: yaegassy Date: Tue, 25 Feb 2020 10:03:53 +0900 Subject: fix "refresh_pattern" for html --- settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.json b/settings.json index a5c8df4..d168b14 100644 --- a/settings.json +++ b/settings.json @@ -238,7 +238,7 @@ { "command": "html-languageserver", "config": { - "refresh_pattern": "\\(/\\|k\\+\\)$" + "refresh_pattern": "\\(/\\|\\k\\+\\)$" }, "requires": [ "npm" -- cgit v1.2.3-54-g00ecf From 3d6f12bafb7f2044b64ac7f3fdb8d37e2a4ec563 Mon Sep 17 00:00:00 2001 From: yaegassy Date: Tue, 25 Feb 2020 12:14:43 +0900 Subject: Added eslint-server support to document --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c960f10..831de69 100644 --- a/README.md +++ b/README.md @@ -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 | -- cgit v1.2.3-54-g00ecf From 99bc73461291ed9609f3bb1311bbe9805abc844a Mon Sep 17 00:00:00 2001 From: Hirokazu Hata Date: Tue, 25 Feb 2020 12:55:54 +0900 Subject: rust-analyzer: Update binary version to 2020-02-24 ref: https://github.com/rust-analyzer/rust-analyzer/releases/tag/2020-02-24 --- installer/install-rust-analyzer.cmd | 2 +- installer/install-rust-analyzer.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- cgit v1.2.3-54-g00ecf From 93e727ababde2112e310d52b6037c68150326b2c Mon Sep 17 00:00:00 2001 From: Mitsuo Heijo Date: Tue, 25 Feb 2020 16:39:44 +0900 Subject: use pre-built language server --- installer/install-eslint-language-server.cmd | 10 ++++------ installer/install-eslint-language-server.sh | 12 ++++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/installer/install-eslint-language-server.cmd b/installer/install-eslint-language-server.cmd index ee71b53..1e3608f 100644 --- a/installer/install-eslint-language-server.cmd +++ b/installer/install-eslint-language-server.cmd @@ -1,14 +1,12 @@ @echo off -git clone "https://github.com/microsoft/vscode-eslint" . -git checkout release/2.0.15 -call npm install -call npm --prefix ./server install ./server -call npm run compile:server +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\server\out\eslintServer.js --stdio %%* ^ +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 df6e4f9..b188e9f 100755 --- a/installer/install-eslint-language-server.sh +++ b/installer/install-eslint-language-server.sh @@ -1,16 +1,16 @@ #!/usr/bin/env bash -git clone "https://github.com/microsoft/vscode-eslint" . -git checkout release/2.0.15 -npm install -npm --prefix ./server install ./server -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 <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 -- cgit v1.2.3-54-g00ecf From 3c1dbc49b65136f845630f226c4c805df579e63d Mon Sep 17 00:00:00 2001 From: Mitsuo Heijo Date: Tue, 25 Feb 2020 16:40:45 +0900 Subject: fix requires and support typescriptreact and javascriptreact --- settings.json | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/settings.json b/settings.json index d168b14..2a6a377 100644 --- a/settings.json +++ b/settings.json @@ -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": [ -- cgit v1.2.3-54-g00ecf From 6f37934b2c02adc2bb2c2b6fc1b271ba65397a49 Mon Sep 17 00:00:00 2001 From: Mitsuo Heijo Date: Tue, 25 Feb 2020 16:41:14 +0900 Subject: drop typescript.tsx --- settings/eslint-language-server.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings/eslint-language-server.vim b/settings/eslint-language-server.vim index f6dd6e3..f27406c 100644 --- a/settings/eslint-language-server.vim +++ b/settings/eslint-language-server.vim @@ -5,7 +5,7 @@ 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': lsp_settings#get('eslint-language-server', 'workspace_config', { -- cgit v1.2.3-54-g00ecf