mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Adds config option for cargo-watch --ignore
flag
This commit is contained in:
parent
e8a7a7b19a
commit
f4d50de275
4 changed files with 22 additions and 2 deletions
|
@ -12,6 +12,7 @@ export interface CargoWatchOptions {
|
|||
arguments: string;
|
||||
command: string;
|
||||
trace: CargoWatchTraceOptions;
|
||||
ignore: string[];
|
||||
}
|
||||
|
||||
export class Config {
|
||||
|
@ -29,7 +30,8 @@ export class Config {
|
|||
enableOnStartup: 'ask',
|
||||
trace: 'off',
|
||||
arguments: '',
|
||||
command: ''
|
||||
command: '',
|
||||
ignore: []
|
||||
};
|
||||
|
||||
private prevEnhancedTyping: null | boolean = null;
|
||||
|
@ -124,6 +126,13 @@ export class Config {
|
|||
);
|
||||
}
|
||||
|
||||
if (config.has('cargo-watch.ignore')) {
|
||||
this.cargoWatchOptions.ignore = config.get<string[]>(
|
||||
'cargo-watch.ignore',
|
||||
[]
|
||||
);
|
||||
}
|
||||
|
||||
if (config.has('lruCapacity')) {
|
||||
this.lruCapacity = config.get('lruCapacity') as number;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue