Add additional_outdirs in config

This commit is contained in:
Edwin Cheng 2020-03-10 21:58:15 +08:00
parent 6b9d66bbee
commit c1db5d26a0
6 changed files with 13 additions and 0 deletions

View file

@ -224,6 +224,11 @@
"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",

View file

@ -37,6 +37,7 @@ export async function createClient(config: Config, serverPath: string): Promise<
excludeGlobs: config.excludeGlobs,
useClientWatching: config.useClientWatching,
featureFlags: config.featureFlags,
additionalOutDirs: config.additionalOutDirs,
withSysroot: config.withSysroot,
cargoFeatures: config.cargoFeatures,
rustfmtArgs: config.rustfmtArgs,

View file

@ -154,6 +154,7 @@ 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 cargoWatchOptions(): CargoWatchOptions {