mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
vscode-postrefactor: minor config refactorings
This commit is contained in:
parent
607d017229
commit
7f02d4657b
2 changed files with 5 additions and 4 deletions
|
@ -35,6 +35,7 @@ export class Config {
|
|||
|
||||
private readonly rootSection = "rust-analyzer";
|
||||
private readonly requiresReloadOpts = [
|
||||
"serverPath",
|
||||
"cargoFeatures",
|
||||
"cargo-watch",
|
||||
"highlighting.semanticTokens",
|
||||
|
@ -50,7 +51,7 @@ export class Config {
|
|||
.extensions
|
||||
.getExtension(this.extensionId)!
|
||||
.packageJSON
|
||||
.version as string;
|
||||
.version as string; // n.n.YYYYMMDD[-nightly]
|
||||
|
||||
if (packageJsonVersion.endsWith(NIGHTLY_TAG)) return NIGHTLY_TAG;
|
||||
|
||||
|
@ -193,7 +194,7 @@ export class Config {
|
|||
// We don't do runtime config validation here for simplicity. More on stackoverflow:
|
||||
// https://stackoverflow.com/questions/60135780/what-is-the-best-way-to-type-check-the-configuration-for-vscode-extension
|
||||
|
||||
get serverPath() { return this.cfg.get("serverPath") as null | string; }
|
||||
private get serverPath() { return this.cfg.get("serverPath") as null | string; }
|
||||
get updatesChannel() { return this.cfg.get("updates.channel") as UpdatesChannel; }
|
||||
get askBeforeDownload() { return this.cfg.get("updates.askBeforeDownload") as boolean; }
|
||||
get highlightingSemanticTokens() { return this.cfg.get("highlighting.semanticTokens") as boolean; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue