aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/config.ts
diff options
context:
space:
mode:
authorlf- <[email protected]>2020-12-30 09:17:25 +0000
committerlf- <[email protected]>2020-12-30 12:51:07 +0000
commitf7f6ac3554d0b5e380985b1a2070000bfd8ef77b (patch)
tree63d549ecaab44bccbcfc996660beeeb698951c67 /editors/code/src/config.ts
parente7d2b5888b8a7e632ae9080108ccbc450316fd86 (diff)
Add an option for extra env vars in the Code extension
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r--editors/code/src/config.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index 848e92af9..fe9f3b4a8 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -1,4 +1,5 @@
1import * as vscode from 'vscode'; 1import * as vscode from 'vscode';
2import { Env } from './client';
2import { log } from "./util"; 3import { log } from "./util";
3 4
4export type UpdatesChannel = "stable" | "nightly"; 5export type UpdatesChannel = "stable" | "nightly";
@@ -13,6 +14,7 @@ export class Config {
13 readonly rootSection = "rust-analyzer"; 14 readonly rootSection = "rust-analyzer";
14 private readonly requiresReloadOpts = [ 15 private readonly requiresReloadOpts = [
15 "serverPath", 16 "serverPath",
17 "server",
16 "cargo", 18 "cargo",
17 "procMacro", 19 "procMacro",
18 "files", 20 "files",
@@ -92,6 +94,7 @@ export class Config {
92 } 94 }
93 95
94 get serverPath() { return this.get<null | string>("serverPath"); } 96 get serverPath() { return this.get<null | string>("serverPath"); }
97 get serverExtraEnv() { return this.get<Env | null>("server.extraEnv") ?? {}; }
95 get channel() { return this.get<UpdatesChannel>("updates.channel"); } 98 get channel() { return this.get<UpdatesChannel>("updates.channel"); }
96 get askBeforeDownload() { return this.get<boolean>("updates.askBeforeDownload"); } 99 get askBeforeDownload() { return this.get<boolean>("updates.askBeforeDownload"); }
97 get traceExtension() { return this.get<boolean>("trace.extension"); } 100 get traceExtension() { return this.get<boolean>("trace.extension"); }