diff options
Diffstat (limited to 'editors/code/src/commands.ts')
-rw-r--r-- | editors/code/src/commands.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts index d0faf4745..e9581a9b5 100644 --- a/editors/code/src/commands.ts +++ b/editors/code/src/commands.ts | |||
@@ -21,7 +21,7 @@ export function analyzerStatus(ctx: Ctx): Cmd { | |||
21 | provideTextDocumentContent(_uri: vscode.Uri): vscode.ProviderResult<string> { | 21 | provideTextDocumentContent(_uri: vscode.Uri): vscode.ProviderResult<string> { |
22 | if (!vscode.window.activeTextEditor) return ''; | 22 | if (!vscode.window.activeTextEditor) return ''; |
23 | 23 | ||
24 | return ctx.client.sendRequest(ra.analyzerStatus, null); | 24 | return ctx.client.sendRequest(ra.analyzerStatus); |
25 | } | 25 | } |
26 | 26 | ||
27 | get onDidChange(): vscode.Event<vscode.Uri> { | 27 | get onDidChange(): vscode.Event<vscode.Uri> { |
@@ -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).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; |
@@ -195,7 +195,7 @@ export function ssr(ctx: Ctx): Cmd { | |||
195 | 195 | ||
196 | const options: vscode.InputBoxOptions = { | 196 | const options: vscode.InputBoxOptions = { |
197 | value: "() ==>> ()", | 197 | value: "() ==>> ()", |
198 | prompt: "Enter request, for example 'Foo($a) ==> Foo::new($a)' ", | 198 | prompt: "Enter request, for example 'Foo($a) ==>> Foo::new($a)' ", |
199 | validateInput: async (x: string) => { | 199 | validateInput: async (x: string) => { |
200 | try { | 200 | try { |
201 | await client.sendRequest(ra.ssr, { | 201 | await client.sendRequest(ra.ssr, { |
@@ -372,7 +372,7 @@ export function expandMacro(ctx: Ctx): Cmd { | |||
372 | } | 372 | } |
373 | 373 | ||
374 | export function reloadWorkspace(ctx: Ctx): Cmd { | 374 | export function reloadWorkspace(ctx: Ctx): Cmd { |
375 | return async () => ctx.client.sendRequest(ra.reloadWorkspace, null); | 375 | return async () => ctx.client.sendRequest(ra.reloadWorkspace); |
376 | } | 376 | } |
377 | 377 | ||
378 | export function showReferences(ctx: Ctx): Cmd { | 378 | export function showReferences(ctx: Ctx): Cmd { |