mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Add an option for extra env vars in the Code extension
This commit is contained in:
parent
e7d2b5888b
commit
f7f6ac3554
4 changed files with 21 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
|||
import * as vscode from 'vscode';
|
||||
import { Env } from './client';
|
||||
import { log } from "./util";
|
||||
|
||||
export type UpdatesChannel = "stable" | "nightly";
|
||||
|
@ -13,6 +14,7 @@ export class Config {
|
|||
readonly rootSection = "rust-analyzer";
|
||||
private readonly requiresReloadOpts = [
|
||||
"serverPath",
|
||||
"server",
|
||||
"cargo",
|
||||
"procMacro",
|
||||
"files",
|
||||
|
@ -92,6 +94,7 @@ export class Config {
|
|||
}
|
||||
|
||||
get serverPath() { return this.get<null | string>("serverPath"); }
|
||||
get serverExtraEnv() { return this.get<Env | null>("server.extraEnv") ?? {}; }
|
||||
get channel() { return this.get<UpdatesChannel>("updates.channel"); }
|
||||
get askBeforeDownload() { return this.get<boolean>("updates.askBeforeDownload"); }
|
||||
get traceExtension() { return this.get<boolean>("trace.extension"); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue