diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-12-30 12:55:26 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-30 12:55:26 +0000 |
commit | ca76a77791d2933770ecf9479eea407bfe5a9946 (patch) | |
tree | 372c42f052763432b9e65d2d501afd7890beaad3 /editors/code/src/config.ts | |
parent | efc76e2c886a0c121b014a587123e2854c5f57df (diff) | |
parent | f7f6ac3554d0b5e380985b1a2070000bfd8ef77b (diff) |
Merge #7091
7091: Add an option for extra env vars in the Code extension r=lf- a=lf-
I was debugging some issues with the RA extension around getting `cargo check` to work and it was particularly frustrating to get the RA_LOG variable set on the server since I had to change it in a login file. This should make that easier.
Co-authored-by: lf- <[email protected]>
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r-- | editors/code/src/config.ts | 3 |
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 @@ | |||
1 | import * as vscode from 'vscode'; | 1 | import * as vscode from 'vscode'; |
2 | import { Env } from './client'; | ||
2 | import { log } from "./util"; | 3 | import { log } from "./util"; |
3 | 4 | ||
4 | export type UpdatesChannel = "stable" | "nightly"; | 5 | export 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"); } |