mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Display vscode message after changing cargo-watch options
This commit is contained in:
parent
754d9d1a0c
commit
edb820c329
1 changed files with 19 additions and 0 deletions
|
@ -42,6 +42,7 @@ export class Config {
|
|||
|
||||
private prevEnhancedTyping: null | boolean = null;
|
||||
private prevCargoFeatures: null | CargoFeatures = null;
|
||||
private prevCargoWatchOptions: null | CargoWatchOptions = null;
|
||||
|
||||
constructor(ctx: vscode.ExtensionContext) {
|
||||
vscode.workspace.onDidChangeConfiguration(_ => this.refresh(), ctx.subscriptions);
|
||||
|
@ -174,6 +175,24 @@ export class Config {
|
|||
}
|
||||
this.prevCargoFeatures = { ...this.cargoFeatures };
|
||||
|
||||
if (
|
||||
this.prevCargoWatchOptions !== null &&
|
||||
(this.cargoWatchOptions.enable !==
|
||||
this.prevCargoWatchOptions.enable ||
|
||||
this.cargoWatchOptions.command !==
|
||||
this.prevCargoWatchOptions.command ||
|
||||
this.cargoWatchOptions.allTargets !==
|
||||
this.prevCargoWatchOptions.allTargets ||
|
||||
this.cargoWatchOptions.arguments.length !==
|
||||
this.prevCargoWatchOptions.arguments.length ||
|
||||
this.cargoWatchOptions.arguments.some(
|
||||
(v, i) => v !== this.prevCargoWatchOptions!.arguments[i],
|
||||
))
|
||||
) {
|
||||
requireReloadMessage = 'Changing cargo-watch options requires a reload';
|
||||
}
|
||||
this.prevCargoWatchOptions = { ...this.cargoWatchOptions };
|
||||
|
||||
if (requireReloadMessage !== null) {
|
||||
const reloadAction = 'Reload now';
|
||||
vscode.window
|
||||
|
|
Loading…
Reference in a new issue