aboutsummaryrefslogtreecommitdiff
path: root/editors/code
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/package.json10
-rw-r--r--editors/code/src/client.ts1
-rw-r--r--editors/code/src/config.ts4
3 files changed, 8 insertions, 7 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index 48f28b28a..b9e0ffd2b 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",
@@ -362,6 +357,11 @@
362 }, 357 },
363 "default": [], 358 "default": [],
364 "description": "List of features to activate" 359 "description": "List of features to activate"
360 },
361 "rust-analyzer.cargoFeatures.loadOutDirsFromCheck": {
362 "type": "boolean",
363 "default": false,
364 "markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs"
365 } 365 }
366 } 366 }
367 }, 367 },
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts
index d65454275..08d821dd0 100644
--- a/editors/code/src/client.ts
+++ b/editors/code/src/client.ts
@@ -42,7 +42,6 @@ export async function createClient(config: Config, serverPath: string): Promise<
42 excludeGlobs: config.excludeGlobs, 42 excludeGlobs: config.excludeGlobs,
43 useClientWatching: config.useClientWatching, 43 useClientWatching: config.useClientWatching,
44 featureFlags: config.featureFlags, 44 featureFlags: config.featureFlags,
45 additionalOutDirs: config.additionalOutDirs,
46 withSysroot: config.withSysroot, 45 withSysroot: config.withSysroot,
47 cargoFeatures: config.cargoFeatures, 46 cargoFeatures: config.cargoFeatures,
48 rustfmtArgs: config.rustfmtArgs, 47 rustfmtArgs: config.rustfmtArgs,
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index bd8096dd6..b45b14bef 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 {
@@ -202,8 +203,8 @@ export class Config {
202 get excludeGlobs() { return this.cfg.get("excludeGlobs") as string[]; } 203 get excludeGlobs() { return this.cfg.get("excludeGlobs") as string[]; }
203 get useClientWatching() { return this.cfg.get("useClientWatching") as boolean; } 204 get useClientWatching() { return this.cfg.get("useClientWatching") as boolean; }
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 rustfmtArgs() { return this.cfg.get("rustfmtArgs") as string[]; } 206 get rustfmtArgs() { return this.cfg.get("rustfmtArgs") as string[]; }
207 get loadOutDirsFromCheck() { return this.cfg.get("loadOutDirsFromCheck") as boolean; }
207 208
208 get cargoWatchOptions(): CargoWatchOptions { 209 get cargoWatchOptions(): CargoWatchOptions {
209 return { 210 return {
@@ -219,6 +220,7 @@ export class Config {
219 noDefaultFeatures: this.cfg.get("cargoFeatures.noDefaultFeatures") as boolean, 220 noDefaultFeatures: this.cfg.get("cargoFeatures.noDefaultFeatures") as boolean,
220 allFeatures: this.cfg.get("cargoFeatures.allFeatures") as boolean, 221 allFeatures: this.cfg.get("cargoFeatures.allFeatures") as boolean,
221 features: this.cfg.get("cargoFeatures.features") as string[], 222 features: this.cfg.get("cargoFeatures.features") as string[],
223 loadOutDirsFromCheck: this.cfg.get("cargoFeatures.loadOutDirsFromCheck") as boolean,
222 }; 224 };
223 } 225 }
224 226