diff options
Diffstat (limited to 'editors')
-rw-r--r-- | editors/code/package-lock.json | 30 | ||||
-rw-r--r-- | editors/code/package.json | 2 | ||||
-rw-r--r-- | editors/code/src/client.ts | 15 | ||||
-rw-r--r-- | editors/code/src/commands.ts | 8 | ||||
-rw-r--r-- | editors/code/src/ctx.ts | 2 | ||||
-rw-r--r-- | editors/code/src/util.ts | 2 |
6 files changed, 25 insertions, 34 deletions
diff --git a/editors/code/package-lock.json b/editors/code/package-lock.json index 0c74561f1..63ba4bdf1 100644 --- a/editors/code/package-lock.json +++ b/editors/code/package-lock.json | |||
@@ -2409,32 +2409,32 @@ | |||
2409 | } | 2409 | } |
2410 | }, | 2410 | }, |
2411 | "vscode-jsonrpc": { | 2411 | "vscode-jsonrpc": { |
2412 | "version": "5.1.0-next.1", | 2412 | "version": "6.0.0-next.5", |
2413 | "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-5.1.0-next.1.tgz", | 2413 | "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0-next.5.tgz", |
2414 | "integrity": "sha512-mwLDojZkbmpizSJSmp690oa9FB9jig18SIDGZeBCvFc2/LYSRvMm/WwWtMBJuJ1MfFh7rZXfQige4Uje5Z9NzA==" | 2414 | "integrity": "sha512-IAgsltQPwg/pXOPsdXgbUTCaO9VSKZwirZN5SGtkdYQ/R3VjeC4v00WTVvoNayWMZpoC3O9u0ogqmsKzKhVasQ==" |
2415 | }, | 2415 | }, |
2416 | "vscode-languageclient": { | 2416 | "vscode-languageclient": { |
2417 | "version": "7.0.0-next.1", | 2417 | "version": "7.0.0-next.9", |
2418 | "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-7.0.0-next.1.tgz", | 2418 | "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-7.0.0-next.9.tgz", |
2419 | "integrity": "sha512-JrjCUhLpQZxQ5VpWpilOHDMhVsn0fdN5jBh1uFNhSr5c2loJvRdr9Km2EuSQOFfOQsBKx0+xvY8PbsypNEcJ6w==", | 2419 | "integrity": "sha512-lFO+rN/i72CM2va6iKXq1lD7pJg8J93KEXf0w0boWVqU+DJhWzLrV3pXl8Xk1nCv//qOAyhlc/nx2KZCTeRF/A==", |
2420 | "requires": { | 2420 | "requires": { |
2421 | "semver": "^6.3.0", | 2421 | "semver": "^6.3.0", |
2422 | "vscode-languageserver-protocol": "3.16.0-next.2" | 2422 | "vscode-languageserver-protocol": "3.16.0-next.7" |
2423 | } | 2423 | } |
2424 | }, | 2424 | }, |
2425 | "vscode-languageserver-protocol": { | 2425 | "vscode-languageserver-protocol": { |
2426 | "version": "3.16.0-next.2", | 2426 | "version": "3.16.0-next.7", |
2427 | "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0-next.2.tgz", | 2427 | "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0-next.7.tgz", |
2428 | "integrity": "sha512-atmkGT/W6tF0cx4SaWFYtFs2UeSeC28RPiap9myv2YZTaTCFvTBEPNWrU5QRKfkyM0tbgtGo6T3UCQ8tkDpjzA==", | 2428 | "integrity": "sha512-tOjrg+K3RddJ547zpC9/LAgTbzadkPuHlqJFFWIcKjVhiJOh73XyY+Ngcu9wukGaTsuSGjJ0W8rlmwanixa0FQ==", |
2429 | "requires": { | 2429 | "requires": { |
2430 | "vscode-jsonrpc": "5.1.0-next.1", | 2430 | "vscode-jsonrpc": "6.0.0-next.5", |
2431 | "vscode-languageserver-types": "3.16.0-next.1" | 2431 | "vscode-languageserver-types": "3.16.0-next.3" |
2432 | } | 2432 | } |
2433 | }, | 2433 | }, |
2434 | "vscode-languageserver-types": { | 2434 | "vscode-languageserver-types": { |
2435 | "version": "3.16.0-next.1", | 2435 | "version": "3.16.0-next.3", |
2436 | "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0-next.1.tgz", | 2436 | "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0-next.3.tgz", |
2437 | "integrity": "sha512-tZFUSbyjUcrh+qQf13ALX4QDdOfDX0cVaBFgy7ktJ0VwS7AW/yRKgGPSxVqqP9OCMNPdqP57O5q47w2pEwfaUg==" | 2437 | "integrity": "sha512-s/z5ZqSe7VpoXJ6JQcvwRiPPA3nG0nAcJ/HH03zoU6QaFfnkcgPK+HshC3WKPPnC2G08xA0iRB6h7kmyBB5Adg==" |
2438 | }, | 2438 | }, |
2439 | "vscode-test": { | 2439 | "vscode-test": { |
2440 | "version": "1.4.0", | 2440 | "version": "1.4.0", |
diff --git a/editors/code/package.json b/editors/code/package.json index 7828407ad..6fc4464df 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -36,7 +36,7 @@ | |||
36 | }, | 36 | }, |
37 | "dependencies": { | 37 | "dependencies": { |
38 | "node-fetch": "^2.6.0", | 38 | "node-fetch": "^2.6.0", |
39 | "vscode-languageclient": "7.0.0-next.1" | 39 | "vscode-languageclient": "7.0.0-next.9" |
40 | }, | 40 | }, |
41 | "devDependencies": { | 41 | "devDependencies": { |
42 | "@rollup/plugin-commonjs": "^13.0.2", | 42 | "@rollup/plugin-commonjs": "^13.0.2", |
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts index f5db55b8c..1ba2352ee 100644 --- a/editors/code/src/client.ts +++ b/editors/code/src/client.ts | |||
@@ -1,10 +1,7 @@ | |||
1 | import * as lc from 'vscode-languageclient'; | 1 | import * as lc from 'vscode-languageclient/node'; |
2 | import * as vscode from 'vscode'; | 2 | import * as vscode from 'vscode'; |
3 | import * as ra from '../src/lsp_ext'; | 3 | import * as ra from '../src/lsp_ext'; |
4 | import * as Is from 'vscode-languageclient/lib/utils/is'; | 4 | import * as Is from 'vscode-languageclient/lib/common/utils/is'; |
5 | |||
6 | import { CallHierarchyFeature } from 'vscode-languageclient/lib/callHierarchy.proposed'; | ||
7 | import { SemanticTokensFeature } from 'vscode-languageclient/lib/semanticTokens.proposed'; | ||
8 | import { assert } from './util'; | 5 | import { assert } from './util'; |
9 | 6 | ||
10 | function renderCommand(cmd: ra.CommandLink) { | 7 | function renderCommand(cmd: ra.CommandLink) { |
@@ -57,7 +54,7 @@ export function createClient(serverPath: string, cwd: string): lc.LanguageClient | |||
57 | return hover; | 54 | return hover; |
58 | }, | 55 | }, |
59 | (error) => { | 56 | (error) => { |
60 | client.logFailedRequest(lc.HoverRequest.type, error); | 57 | client.handleFailedRequest(lc.HoverRequest.type, error, null); |
61 | return Promise.resolve(null); | 58 | return Promise.resolve(null); |
62 | }); | 59 | }); |
63 | }, | 60 | }, |
@@ -140,12 +137,6 @@ export function createClient(serverPath: string, cwd: string): lc.LanguageClient | |||
140 | ); | 137 | ); |
141 | 138 | ||
142 | // To turn on all proposed features use: client.registerProposedFeatures(); | 139 | // To turn on all proposed features use: client.registerProposedFeatures(); |
143 | // Here we want to enable CallHierarchyFeature and SemanticTokensFeature | ||
144 | // since they are available on stable. | ||
145 | // Note that while these features are stable in vscode their LSP protocol | ||
146 | // implementations are still in the "proposed" category for 3.16. | ||
147 | client.registerFeature(new CallHierarchyFeature(client)); | ||
148 | client.registerFeature(new SemanticTokensFeature(client)); | ||
149 | client.registerFeature(new ExperimentalFeatures()); | 140 | client.registerFeature(new ExperimentalFeatures()); |
150 | 141 | ||
151 | return client; | 142 | return client; |
diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts index d0faf4745..69f2836ad 100644 --- a/editors/code/src/commands.ts +++ b/editors/code/src/commands.ts | |||
@@ -63,7 +63,7 @@ export function memoryUsage(ctx: Ctx): Cmd { | |||
63 | provideTextDocumentContent(_uri: vscode.Uri): vscode.ProviderResult<string> { | 63 | provideTextDocumentContent(_uri: vscode.Uri): vscode.ProviderResult<string> { |
64 | if (!vscode.window.activeTextEditor) return ''; | 64 | if (!vscode.window.activeTextEditor) return ''; |
65 | 65 | ||
66 | return ctx.client.sendRequest(ra.memoryUsage, null).then((mem) => { | 66 | return ctx.client.sendRequest(ra.memoryUsage, null).then((mem: any) => { |
67 | return 'Per-query memory usage:\n' + mem + '\n(note: database has been cleared)'; | 67 | return 'Per-query memory usage:\n' + mem + '\n(note: database has been cleared)'; |
68 | }); | 68 | }); |
69 | } | 69 | } |
@@ -121,7 +121,7 @@ export function joinLines(ctx: Ctx): Cmd { | |||
121 | textDocument: { uri: editor.document.uri.toString() }, | 121 | textDocument: { uri: editor.document.uri.toString() }, |
122 | }); | 122 | }); |
123 | editor.edit((builder) => { | 123 | editor.edit((builder) => { |
124 | client.protocol2CodeConverter.asTextEdits(items).forEach((edit) => { | 124 | client.protocol2CodeConverter.asTextEdits(items).forEach((edit: any) => { |
125 | builder.replace(edit.range, edit.newText); | 125 | builder.replace(edit.range, edit.newText); |
126 | }); | 126 | }); |
127 | }); | 127 | }); |
@@ -140,8 +140,8 @@ export function onEnter(ctx: Ctx): Cmd { | |||
140 | position: client.code2ProtocolConverter.asPosition( | 140 | position: client.code2ProtocolConverter.asPosition( |
141 | editor.selection.active, | 141 | editor.selection.active, |
142 | ), | 142 | ), |
143 | }).catch(_error => { | 143 | }).catch((_error: any) => { |
144 | // client.logFailedRequest(OnEnterRequest.type, error); | 144 | // client.handleFailedRequest(OnEnterRequest.type, error, null); |
145 | return null; | 145 | return null; |
146 | }); | 146 | }); |
147 | if (!lcEdits) return false; | 147 | if (!lcEdits) return false; |
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts index 543f7e02e..d39864d33 100644 --- a/editors/code/src/ctx.ts +++ b/editors/code/src/ctx.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import * as vscode from 'vscode'; | 1 | import * as vscode from 'vscode'; |
2 | import * as lc from 'vscode-languageclient'; | 2 | import * as lc from 'vscode-languageclient/node'; |
3 | import * as ra from './lsp_ext'; | 3 | import * as ra from './lsp_ext'; |
4 | 4 | ||
5 | import { Config } from './config'; | 5 | import { Config } from './config'; |
diff --git a/editors/code/src/util.ts b/editors/code/src/util.ts index ec2087502..08159b43c 100644 --- a/editors/code/src/util.ts +++ b/editors/code/src/util.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import * as lc from "vscode-languageclient"; | 1 | import * as lc from "vscode-languageclient/node"; |
2 | import * as vscode from "vscode"; | 2 | import * as vscode from "vscode"; |
3 | import { strict as nativeAssert } from "assert"; | 3 | import { strict as nativeAssert } from "assert"; |
4 | import { spawnSync } from "child_process"; | 4 | import { spawnSync } from "child_process"; |