aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorEmil Lauridsen <[email protected]>2020-03-16 13:10:13 +0000
committerEmil Lauridsen <[email protected]>2020-03-17 13:47:05 +0000
commitf5a2fcf8f59eda3498bbdcb87568e5ba6b4db8b7 (patch)
tree1ace16a13f74d6165780b8054b0b4e8b43f945c2 /editors
parent33c6c7abc6621f8b0cf083a98f7e4788cf4b5b54 (diff)
Change existing OUT_DIR override config to make use of new infrastructure
Diffstat (limited to 'editors')
-rw-r--r--editors/code/package.json10
-rw-r--r--editors/code/src/config.ts3
2 files changed, 7 insertions, 6 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index 188a2f9ca..b4128acf0 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -237,11 +237,6 @@
237 "default": true, 237 "default": true,
238 "description": "Whether to ask for permission before downloading any files from the Internet" 238 "description": "Whether to ask for permission before downloading any files from the Internet"
239 }, 239 },
240 "rust-analyzer.additionalOutDirs": {
241 "type": "object",
242 "default": {},
243 "markdownDescription": "Fine grained controls for OUT_DIR `env!(\"OUT_DIR\")` variable. e.g. `{\"foo\":\"/path/to/foo\"}`, "
244 },
245 "rust-analyzer.serverPath": { 240 "rust-analyzer.serverPath": {
246 "type": [ 241 "type": [
247 "null", 242 "null",
@@ -367,6 +362,11 @@
367 "type": "boolean", 362 "type": "boolean",
368 "default": false, 363 "default": false,
369 "markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs" 364 "markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs"
365 },
366 "rust-analyzer.cargoFeatures.outDirOverrides": {
367 "type": "object",
368 "default": {},
369 "markdownDescription": "Fine grained controls for OUT_DIR `env!(\"OUT_DIR\")` variable. e.g. `{\"foo 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)\":\"/path/to/foo\"}`, "
370 } 370 }
371 } 371 }
372 }, 372 },
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index 84ec81ecd..c7323f6e9 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -23,6 +23,7 @@ export interface CargoFeatures {
23 allFeatures: boolean; 23 allFeatures: boolean;
24 features: string[]; 24 features: string[];
25 loadOutDirsFromCheck: boolean; 25 loadOutDirsFromCheck: boolean;
26 outDirOverrides: Record<string, string>;
26} 27}
27 28
28export const enum UpdatesChannel { 29export const enum UpdatesChannel {
@@ -203,7 +204,6 @@ export class Config {
203 get excludeGlobs() { return this.cfg.get("excludeGlobs") as string[]; } 204 get excludeGlobs() { return this.cfg.get("excludeGlobs") as string[]; }
204 get useClientWatching() { return this.cfg.get("useClientWatching") as boolean; } 205 get useClientWatching() { return this.cfg.get("useClientWatching") as boolean; }
205 get featureFlags() { return this.cfg.get("featureFlags") as Record<string, boolean>; } 206 get featureFlags() { return this.cfg.get("featureFlags") as Record<string, boolean>; }
206 get additionalOutDirs() { return this.cfg.get("additionalOutDirs") as Record<string, string>; }
207 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; } 208 get loadOutDirsFromCheck() { return this.cfg.get("loadOutDirsFromCheck") as boolean; }
209 209
@@ -222,6 +222,7 @@ export class Config {
222 allFeatures: this.cfg.get("cargoFeatures.allFeatures") as boolean, 222 allFeatures: this.cfg.get("cargoFeatures.allFeatures") as boolean,
223 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, 224 loadOutDirsFromCheck: this.cfg.get("cargoFeatures.loadOutDirsFromCheck") as boolean,
225 outDirOverrides: this.cfg.get("cargoFeatures.outDirOverrides") as Record<string, string>,
225 }; 226 };
226 } 227 }
227 228