diff options
| author | Emil Lauridsen <mine809@gmail.com> | 2020-03-16 14:10:13 +0100 |
|---|---|---|
| committer | Emil Lauridsen <mine809@gmail.com> | 2020-03-17 14:47:05 +0100 |
| commit | f5a2fcf8f59eda3498bbdcb87568e5ba6b4db8b7 (patch) | |
| tree | 1ace16a13f74d6165780b8054b0b4e8b43f945c2 /editors/code | |
| parent | 33c6c7abc6621f8b0cf083a98f7e4788cf4b5b54 (diff) | |
| download | rust-f5a2fcf8f59eda3498bbdcb87568e5ba6b4db8b7.tar.gz rust-f5a2fcf8f59eda3498bbdcb87568e5ba6b4db8b7.zip | |
Change existing OUT_DIR override config to make use of new infrastructure
Diffstat (limited to 'editors/code')
| -rw-r--r-- | editors/code/package.json | 10 | ||||
| -rw-r--r-- | editors/code/src/config.ts | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index 188a2f9ca68..b4128acf07b 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -237,11 +237,6 @@ "default": true, "description": "Whether to ask for permission before downloading any files from the Internet" }, - "rust-analyzer.additionalOutDirs": { - "type": "object", - "default": {}, - "markdownDescription": "Fine grained controls for OUT_DIR `env!(\"OUT_DIR\")` variable. e.g. `{\"foo\":\"/path/to/foo\"}`, " - }, "rust-analyzer.serverPath": { "type": [ "null", @@ -367,6 +362,11 @@ "type": "boolean", "default": false, "markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs" + }, + "rust-analyzer.cargoFeatures.outDirOverrides": { + "type": "object", + "default": {}, + "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\"}`, " } } }, diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 84ec81ecdc1..c7323f6e924 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts @@ -23,6 +23,7 @@ export interface CargoFeatures { allFeatures: boolean; features: string[]; loadOutDirsFromCheck: boolean; + outDirOverrides: Record<string, string>; } export const enum UpdatesChannel { @@ -203,7 +204,6 @@ export class Config { get excludeGlobs() { return this.cfg.get("excludeGlobs") as string[]; } get useClientWatching() { return this.cfg.get("useClientWatching") as boolean; } get featureFlags() { return this.cfg.get("featureFlags") as Record<string, boolean>; } - get additionalOutDirs() { return this.cfg.get("additionalOutDirs") as Record<string, string>; } get rustfmtArgs() { return this.cfg.get("rustfmtArgs") as string[]; } get loadOutDirsFromCheck() { return this.cfg.get("loadOutDirsFromCheck") as boolean; } @@ -222,6 +222,7 @@ export class Config { allFeatures: this.cfg.get("cargoFeatures.allFeatures") as boolean, features: this.cfg.get("cargoFeatures.features") as string[], loadOutDirsFromCheck: this.cfg.get("cargoFeatures.loadOutDirsFromCheck") as boolean, + outDirOverrides: this.cfg.get("cargoFeatures.outDirOverrides") as Record<string, string>, }; } |
