mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Refactor status activation
This commit is contained in:
parent
1327aed7f6
commit
e4b588868f
5 changed files with 36 additions and 43 deletions
|
@ -1,8 +1,16 @@
|
|||
import * as vscode from 'vscode';
|
||||
|
||||
import { Ctx } from './ctx';
|
||||
|
||||
const spinnerFrames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
||||
|
||||
export class StatusDisplay implements vscode.Disposable {
|
||||
export function activateStatusDisplay(ctx: Ctx) {
|
||||
const statusDisplay = new StatusDisplay(ctx.config.cargoWatchOptions.command);
|
||||
ctx.pushCleanup(statusDisplay);
|
||||
ctx.onNotification('$/progress', params => statusDisplay.handleProgressNotification(params));
|
||||
}
|
||||
|
||||
class StatusDisplay implements vscode.Disposable {
|
||||
packageName?: string;
|
||||
|
||||
private i = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue