aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/config.ts
diff options
context:
space:
mode:
authorvsrs <[email protected]>2020-07-02 17:47:40 +0100
committervsrs <[email protected]>2020-07-03 12:23:51 +0100
commit7b79d24ad5b251c0806a07aa7769e824f3c37fec (patch)
tree1bf651ecddfdaecaccba02c3e9100f73c72e65a8 /editors/code/src/config.ts
parent57576ac420989070e695bac195d516a410191ad9 (diff)
Add runnable env support.
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r--editors/code/src/config.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index fc95a7de6..a317aabcb 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -5,6 +5,8 @@ export type UpdatesChannel = "stable" | "nightly";
5 5
6export const NIGHTLY_TAG = "nightly"; 6export const NIGHTLY_TAG = "nightly";
7 7
8export type RunnableEnvCfg = Record<string, string> | [{ mask?: string, env: Record<string, string>; }]
9
8export class Config { 10export class Config {
9 readonly extensionId = "matklad.rust-analyzer"; 11 readonly extensionId = "matklad.rust-analyzer";
10 12
@@ -114,6 +116,10 @@ export class Config {
114 return this.get<string | undefined>("cargoRunner"); 116 return this.get<string | undefined>("cargoRunner");
115 } 117 }
116 118
119 get runnableEnv() {
120 return this.get<RunnableEnvCfg | undefined>("runnableEnv");
121 }
122
117 get debug() { 123 get debug() {
118 // "/rustc/<id>" used by suggestions only. 124 // "/rustc/<id>" used by suggestions only.
119 const { ["/rustc/<id>"]: _, ...sourceFileMap } = this.get<Record<string, string>>("debug.sourceFileMap"); 125 const { ["/rustc/<id>"]: _, ...sourceFileMap } = this.get<Record<string, string>>("debug.sourceFileMap");