aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/config.ts
diff options
context:
space:
mode:
authorRoberto Vidal <[email protected]>2019-10-17 14:22:39 +0100
committerRoberto Vidal <[email protected]>2019-10-17 19:21:07 +0100
commitf4d50de2758b38208745d9594ccbcf0227d49d5b (patch)
treeb55fba950d29f6bd041f26e78e3e56cefb649c31 /editors/code/src/config.ts
parente8a7a7b19aab195d2b37a0b13abca4e006e9bbd5 (diff)
Adds config option for cargo-watch `--ignore` flag
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r--editors/code/src/config.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index a4581485c..49bdf7d72 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -12,6 +12,7 @@ export interface CargoWatchOptions {
12 arguments: string; 12 arguments: string;
13 command: string; 13 command: string;
14 trace: CargoWatchTraceOptions; 14 trace: CargoWatchTraceOptions;
15 ignore: string[];
15} 16}
16 17
17export class Config { 18export class Config {
@@ -29,7 +30,8 @@ export class Config {
29 enableOnStartup: 'ask', 30 enableOnStartup: 'ask',
30 trace: 'off', 31 trace: 'off',
31 arguments: '', 32 arguments: '',
32 command: '' 33 command: '',
34 ignore: []
33 }; 35 };
34 36
35 private prevEnhancedTyping: null | boolean = null; 37 private prevEnhancedTyping: null | boolean = null;
@@ -124,6 +126,13 @@ export class Config {
124 ); 126 );
125 } 127 }
126 128
129 if (config.has('cargo-watch.ignore')) {
130 this.cargoWatchOptions.ignore = config.get<string[]>(
131 'cargo-watch.ignore',
132 []
133 );
134 }
135
127 if (config.has('lruCapacity')) { 136 if (config.has('lruCapacity')) {
128 this.lruCapacity = config.get('lruCapacity') as number; 137 this.lruCapacity = config.get('lruCapacity') as number;
129 } 138 }