diff options
author | Laurențiu Nicola <[email protected]> | 2020-09-17 11:31:42 +0100 |
---|---|---|
committer | Laurențiu Nicola <[email protected]> | 2020-09-17 11:31:42 +0100 |
commit | c217bc561f6458f8f9f1133e25635ba32e71e7db (patch) | |
tree | 0152572f494c74998f5ffba1acd694a0bd8dbadb /editors/code/src | |
parent | 3877421373ef1439e53b7f7274865af287dbb47f (diff) |
Fix LSP requests with no arguments
Diffstat (limited to 'editors/code/src')
-rw-r--r-- | editors/code/src/commands.ts | 6 | ||||
-rw-r--r-- | editors/code/src/lsp_ext.ts | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts index 4321de244..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: any) => { | 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 | } |
@@ -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 { |
diff --git a/editors/code/src/lsp_ext.ts b/editors/code/src/lsp_ext.ts index f280bba3d..d167041c4 100644 --- a/editors/code/src/lsp_ext.ts +++ b/editors/code/src/lsp_ext.ts | |||
@@ -4,8 +4,8 @@ | |||
4 | 4 | ||
5 | import * as lc from "vscode-languageclient"; | 5 | import * as lc from "vscode-languageclient"; |
6 | 6 | ||
7 | export const analyzerStatus = new lc.RequestType<null, string, void>("rust-analyzer/analyzerStatus"); | 7 | export const analyzerStatus = new lc.RequestType0<string, void>("rust-analyzer/analyzerStatus"); |
8 | export const memoryUsage = new lc.RequestType<null, string, void>("rust-analyzer/memoryUsage"); | 8 | export const memoryUsage = new lc.RequestType0<string, void>("rust-analyzer/memoryUsage"); |
9 | 9 | ||
10 | export type Status = "loading" | "ready" | "invalid" | "needsReload"; | 10 | export type Status = "loading" | "ready" | "invalid" | "needsReload"; |
11 | export interface StatusParams { | 11 | export interface StatusParams { |
@@ -13,7 +13,7 @@ export interface StatusParams { | |||
13 | } | 13 | } |
14 | export const status = new lc.NotificationType<StatusParams>("rust-analyzer/status"); | 14 | export const status = new lc.NotificationType<StatusParams>("rust-analyzer/status"); |
15 | 15 | ||
16 | export const reloadWorkspace = new lc.RequestType<null, null, void>("rust-analyzer/reloadWorkspace"); | 16 | export const reloadWorkspace = new lc.RequestType0<null, void>("rust-analyzer/reloadWorkspace"); |
17 | 17 | ||
18 | export interface SyntaxTreeParams { | 18 | export interface SyntaxTreeParams { |
19 | textDocument: lc.TextDocumentIdentifier; | 19 | textDocument: lc.TextDocumentIdentifier; |