vscode: redesigned config with simplicity and Dart extension config implementation in mind

This commit is contained in:
Veetaha 2020-02-13 22:48:20 +02:00
parent 9b47124e6e
commit 7ad15c3962
5 changed files with 98 additions and 218 deletions

View file

@ -7,7 +7,7 @@ import { Ctx } from './ctx';
const spinnerFrames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
export function activateStatusDisplay(ctx: Ctx) {
const statusDisplay = new StatusDisplay(ctx.config.cargoWatchOptions.command);
const statusDisplay = new StatusDisplay(ctx.config.cargoWatchOptions().command);
ctx.pushCleanup(statusDisplay);
ctx.onDidRestart(client => ctx.pushCleanup(client.onProgress(
WorkDoneProgress.type,
@ -66,9 +66,9 @@ class StatusDisplay implements Disposable {
refreshLabel() {
if (this.packageName) {
this.statusBarItem!.text = `${spinnerFrames[this.i]} cargo ${this.command} [${this.packageName}]`;
this.statusBarItem.text = `${spinnerFrames[this.i]} cargo ${this.command} [${this.packageName}]`;
} else {
this.statusBarItem!.text = `${spinnerFrames[this.i]} cargo ${this.command}`;
this.statusBarItem.text = `${spinnerFrames[this.i]} cargo ${this.command}`;
}
}