Skip to content

Commit

Permalink
feat: StatusParams support
Browse files Browse the repository at this point in the history
lsp_ext #256
  • Loading branch information
fannheyward committed Aug 18, 2020
1 parent 60b75af commit fc0136d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/ctx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export class Ctx {
this.extCtx.subscriptions.push(services.registLanguageClient(client));
await client.onReady();

client.onNotification(ra.status, async (status) => {
client.onNotification(ra.status, async (params) => {
const status = params.status;
this.statusBar.text = `rust-analyzer ${status}`;
this.statusBar.show();

Expand Down
5 changes: 4 additions & 1 deletion src/lsp_ext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down

0 comments on commit fc0136d

Please sign in to comment.