diff options
author | Veetaha <[email protected]> | 2020-03-14 00:00:34 +0000 |
---|---|---|
committer | Veetaha <[email protected]> | 2020-03-14 00:01:46 +0000 |
commit | 7f02d4657b796a438e441e107d4fb1906ec1ed7b (patch) | |
tree | 6d955957f2bc85aaae4ed6e8e5ffb63014ec079f /editors/code/src/config.ts | |
parent | 607d017229ce398bd7fef43aa5f4ab35914e6f31 (diff) |
vscode-postrefactor: minor config refactorings
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r-- | editors/code/src/config.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 5371384ba..93f72409d 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -35,6 +35,7 @@ export class Config { | |||
35 | 35 | ||
36 | private readonly rootSection = "rust-analyzer"; | 36 | private readonly rootSection = "rust-analyzer"; |
37 | private readonly requiresReloadOpts = [ | 37 | private readonly requiresReloadOpts = [ |
38 | "serverPath", | ||
38 | "cargoFeatures", | 39 | "cargoFeatures", |
39 | "cargo-watch", | 40 | "cargo-watch", |
40 | "highlighting.semanticTokens", | 41 | "highlighting.semanticTokens", |
@@ -50,7 +51,7 @@ export class Config { | |||
50 | .extensions | 51 | .extensions |
51 | .getExtension(this.extensionId)! | 52 | .getExtension(this.extensionId)! |
52 | .packageJSON | 53 | .packageJSON |
53 | .version as string; | 54 | .version as string; // n.n.YYYYMMDD[-nightly] |
54 | 55 | ||
55 | if (packageJsonVersion.endsWith(NIGHTLY_TAG)) return NIGHTLY_TAG; | 56 | if (packageJsonVersion.endsWith(NIGHTLY_TAG)) return NIGHTLY_TAG; |
56 | 57 | ||
@@ -193,7 +194,7 @@ export class Config { | |||
193 | // We don't do runtime config validation here for simplicity. More on stackoverflow: | 194 | // We don't do runtime config validation here for simplicity. More on stackoverflow: |
194 | // https://stackoverflow.com/questions/60135780/what-is-the-best-way-to-type-check-the-configuration-for-vscode-extension | 195 | // https://stackoverflow.com/questions/60135780/what-is-the-best-way-to-type-check-the-configuration-for-vscode-extension |
195 | 196 | ||
196 | get serverPath() { return this.cfg.get("serverPath") as null | string; } | 197 | private get serverPath() { return this.cfg.get("serverPath") as null | string; } |
197 | get updatesChannel() { return this.cfg.get("updates.channel") as UpdatesChannel; } | 198 | get updatesChannel() { return this.cfg.get("updates.channel") as UpdatesChannel; } |
198 | get askBeforeDownload() { return this.cfg.get("updates.askBeforeDownload") as boolean; } | 199 | get askBeforeDownload() { return this.cfg.get("updates.askBeforeDownload") as boolean; } |
199 | get highlightingSemanticTokens() { return this.cfg.get("highlighting.semanticTokens") as boolean; } | 200 | get highlightingSemanticTokens() { return this.cfg.get("highlighting.semanticTokens") as boolean; } |