mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 01:17:27 +00:00
Fix LSP requests with no arguments
This commit is contained in:
parent
3877421373
commit
c217bc561f
2 changed files with 6 additions and 6 deletions
|
@ -21,7 +21,7 @@ export function analyzerStatus(ctx: Ctx): Cmd {
|
|||
provideTextDocumentContent(_uri: vscode.Uri): vscode.ProviderResult<string> {
|
||||
if (!vscode.window.activeTextEditor) return '';
|
||||
|
||||
return ctx.client.sendRequest(ra.analyzerStatus, null);
|
||||
return ctx.client.sendRequest(ra.analyzerStatus);
|
||||
}
|
||||
|
||||
get onDidChange(): vscode.Event<vscode.Uri> {
|
||||
|
@ -63,7 +63,7 @@ export function memoryUsage(ctx: Ctx): Cmd {
|
|||
provideTextDocumentContent(_uri: vscode.Uri): vscode.ProviderResult<string> {
|
||||
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 {
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
import * as lc from "vscode-languageclient";
|
||||
|
||||
export const analyzerStatus = new lc.RequestType<null, string, void>("rust-analyzer/analyzerStatus");
|
||||
export const memoryUsage = new lc.RequestType<null, string, void>("rust-analyzer/memoryUsage");
|
||||
export const analyzerStatus = new lc.RequestType0<string, void>("rust-analyzer/analyzerStatus");
|
||||
export const memoryUsage = new lc.RequestType0<string, void>("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<StatusParams>("rust-analyzer/status");
|
||||
|
||||
export const reloadWorkspace = new lc.RequestType<null, null, void>("rust-analyzer/reloadWorkspace");
|
||||
export const reloadWorkspace = new lc.RequestType0<null, void>("rust-analyzer/reloadWorkspace");
|
||||
|
||||
export interface SyntaxTreeParams {
|
||||
textDocument: lc.TextDocumentIdentifier;
|
||||
|
|
Loading…
Reference in a new issue