aboutsummaryrefslogtreecommitdiff
path: root/editors/code
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/package.json5
-rw-r--r--editors/code/src/config.ts3
2 files changed, 8 insertions, 0 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index 48f28b28a..188a2f9ca 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -362,6 +362,11 @@
362 }, 362 },
363 "default": [], 363 "default": [],
364 "description": "List of features to activate" 364 "description": "List of features to activate"
365 },
366 "rust-analyzer.cargoFeatures.loadOutDirsFromCheck": {
367 "type": "boolean",
368 "default": false,
369 "markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs"
365 } 370 }
366 } 371 }
367 }, 372 },
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index bd8096dd6..84ec81ecd 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -22,6 +22,7 @@ export interface CargoFeatures {
22 noDefaultFeatures: boolean; 22 noDefaultFeatures: boolean;
23 allFeatures: boolean; 23 allFeatures: boolean;
24 features: string[]; 24 features: string[];
25 loadOutDirsFromCheck: boolean;
25} 26}
26 27
27export const enum UpdatesChannel { 28export const enum UpdatesChannel {
@@ -204,6 +205,7 @@ export class Config {
204 get featureFlags() { return this.cfg.get("featureFlags") as Record<string, boolean>; } 205 get featureFlags() { return this.cfg.get("featureFlags") as Record<string, boolean>; }
205 get additionalOutDirs() { return this.cfg.get("additionalOutDirs") as Record<string, string>; } 206 get additionalOutDirs() { return this.cfg.get("additionalOutDirs") as Record<string, string>; }
206 get rustfmtArgs() { return this.cfg.get("rustfmtArgs") as string[]; } 207 get rustfmtArgs() { return this.cfg.get("rustfmtArgs") as string[]; }
208 get loadOutDirsFromCheck() { return this.cfg.get("loadOutDirsFromCheck") as boolean; }
207 209
208 get cargoWatchOptions(): CargoWatchOptions { 210 get cargoWatchOptions(): CargoWatchOptions {
209 return { 211 return {
@@ -219,6 +221,7 @@ export class Config {
219 noDefaultFeatures: this.cfg.get("cargoFeatures.noDefaultFeatures") as boolean, 221 noDefaultFeatures: this.cfg.get("cargoFeatures.noDefaultFeatures") as boolean,
220 allFeatures: this.cfg.get("cargoFeatures.allFeatures") as boolean, 222 allFeatures: this.cfg.get("cargoFeatures.allFeatures") as boolean,
221 features: this.cfg.get("cargoFeatures.features") as string[], 223 features: this.cfg.get("cargoFeatures.features") as string[],
224 loadOutDirsFromCheck: this.cfg.get("cargoFeatures.loadOutDirsFromCheck") as boolean,
222 }; 225 };
223 } 226 }
224 227