Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'editors/code/src/ctx.ts')
| -rw-r--r-- | editors/code/src/ctx.ts | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts index 37a2ee2369..e55754fb9f 100644 --- a/editors/code/src/ctx.ts +++ b/editors/code/src/ctx.ts @@ -190,11 +190,11 @@ export class Ctx implements RustAnalyzerExtensionApi { } if (!this.traceOutputChannel) { - this.traceOutputChannel = new LazyOutputChannel("Rust Analyzer Language Server Trace"); + this.traceOutputChannel = new LazyOutputChannel("rust-analyzer LSP Trace"); this.pushExtCleanup(this.traceOutputChannel); } if (!this.outputChannel) { - this.outputChannel = vscode.window.createOutputChannel("Rust Analyzer Language Server"); + this.outputChannel = vscode.window.createOutputChannel("rust-analyzer Language Server"); this.pushExtCleanup(this.outputChannel); } @@ -213,7 +213,14 @@ export class Ctx implements RustAnalyzerExtensionApi { this.refreshServerStatus(); }, ); - const newEnv = Object.assign({}, process.env, this.config.serverExtraEnv); + const newEnv = { ...process.env }; + for (const [k, v] of Object.entries(this.config.serverExtraEnv)) { + if (v) { + newEnv[k] = v; + } else if (k in newEnv) { + delete newEnv[k]; + } + } const run: lc.Executable = { command: this._serverPath, options: { env: newEnv }, |