From c217bc561f6458f8f9f1133e25635ba32e71e7db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Thu, 17 Sep 2020 13:31:42 +0300 Subject: Fix LSP requests with no arguments --- editors/code/src/commands.ts | 6 +++--- editors/code/src/lsp_ext.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'editors') 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 { provideTextDocumentContent(_uri: vscode.Uri): vscode.ProviderResult { if (!vscode.window.activeTextEditor) return ''; - return ctx.client.sendRequest(ra.analyzerStatus, null); + return ctx.client.sendRequest(ra.analyzerStatus); } get onDidChange(): vscode.Event { @@ -63,7 +63,7 @@ export function memoryUsage(ctx: Ctx): Cmd { provideTextDocumentContent(_uri: vscode.Uri): vscode.ProviderResult { if (!vscode.window.activeTextEditor) return ''; - return ctx.client.sendRequest(ra.memoryUsage, null).then((mem: any) => { + return ctx.client.sendRequest(ra.memoryUsage).then((mem: any) => { return 'Per-query memory usage:\n' + mem + '\n(note: database has been cleared)'; }); } @@ -372,7 +372,7 @@ export function expandMacro(ctx: Ctx): Cmd { } export function reloadWorkspace(ctx: Ctx): Cmd { - return async () => ctx.client.sendRequest(ra.reloadWorkspace, null); + return async () => ctx.client.sendRequest(ra.reloadWorkspace); } 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 @@ import * as lc from "vscode-languageclient"; -export const analyzerStatus = new lc.RequestType("rust-analyzer/analyzerStatus"); -export const memoryUsage = new lc.RequestType("rust-analyzer/memoryUsage"); +export const analyzerStatus = new lc.RequestType0("rust-analyzer/analyzerStatus"); +export const memoryUsage = new lc.RequestType0("rust-analyzer/memoryUsage"); export type Status = "loading" | "ready" | "invalid" | "needsReload"; export interface StatusParams { @@ -13,7 +13,7 @@ export interface StatusParams { } export const status = new lc.NotificationType("rust-analyzer/status"); -export const reloadWorkspace = new lc.RequestType("rust-analyzer/reloadWorkspace"); +export const reloadWorkspace = new lc.RequestType0("rust-analyzer/reloadWorkspace"); export interface SyntaxTreeParams { textDocument: lc.TextDocumentIdentifier; -- cgit v1.2.3