mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-09 18:02:48 +00:00
Merge #5782
5782: Fix StatusNotification r=matklad a=vsrs This PR fixes the following: As per specification `params` property in [NotificationMessage ](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#notificationMessage) should be `array | object` while RA uses `"loading" | "ready" | "invalid" | "needsReload"`. Co-authored-by: vsrs <vit@conrlab.com>
This commit is contained in:
commit
6826dd044a
5 changed files with 22 additions and 5 deletions
|
@ -36,7 +36,7 @@ export class Ctx {
|
|||
|
||||
res.pushCleanup(client.start());
|
||||
await client.onReady();
|
||||
client.onNotification(ra.status, (status) => res.setStatus(status));
|
||||
client.onNotification(ra.status, (params) => res.setStatus(params.status));
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,10 @@ export const analyzerStatus = new lc.RequestType<null, string, void>("rust-analy
|
|||
export const memoryUsage = new lc.RequestType<null, string, void>("rust-analyzer/memoryUsage");
|
||||
|
||||
export type Status = "loading" | "ready" | "invalid" | "needsReload";
|
||||
export const status = new lc.NotificationType<Status>("rust-analyzer/status");
|
||||
export interface StatusParams {
|
||||
status: Status;
|
||||
}
|
||||
export const status = new lc.NotificationType<StatusParams>("rust-analyzer/status");
|
||||
|
||||
export const reloadWorkspace = new lc.RequestType<null, null, void>("rust-analyzer/reloadWorkspace");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue