aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands.ts
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-09-02 16:11:22 +0100
committerGitHub <[email protected]>2020-09-02 16:11:22 +0100
commit7f79dbc84f5d69ec6f48fa8d67bdfa0525c5dd34 (patch)
tree90d1912ea279c6c76249320a9a750b383eda2d36 /editors/code/src/commands.ts
parenta2e8e513e4907da2662dcec12c7e9d262873a664 (diff)
parent36692bdffa59accee75e34647d83cbd8190b7906 (diff)
Merge #5930
5930: Migrate to the latest Semantic Tokens Proposal for LSP 3.16 r=matklad a=kjeremy This stabilizes call hierarchy and semantic tokens features on the client side and changes the server-side semantic tokens protocol to match the latest proposal for 3.16. The server-side change will break clients depending on the earlier semantic tokens draft. Fixes #4942 Co-authored-by: kjeremy <[email protected]>
Diffstat (limited to 'editors/code/src/commands.ts')
-rw-r--r--editors/code/src/commands.ts8
1 files changed, 4 insertions, 4 deletions
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;