aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/config.ts
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-02-17 22:42:25 +0000
committerAleksey Kladov <[email protected]>2020-02-17 22:42:25 +0000
commit07a77ffb351af783df45544447eb1ea88b569540 (patch)
treeeb8892c68378ebf555b57cc11d8ed8f2446284e6 /editors/code/src/config.ts
parent326556b09078a398e641dd221ab870ee0fe47f68 (diff)
Migrate to eslint
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r--editors/code/src/config.ts34
1 files changed, 17 insertions, 17 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index c3fa788c7..fab062dda 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -22,7 +22,7 @@ export class Config {
22 "cargoFeatures", 22 "cargoFeatures",
23 "cargo-watch", 23 "cargo-watch",
24 ] 24 ]
25 .map(opt => `${Config.rootSection}.${opt}`); 25 .map(opt => `${Config.rootSection}.${opt}`);
26 26
27 private static readonly extensionVersion: string = (() => { 27 private static readonly extensionVersion: string = (() => {
28 const packageJsonVersion = vscode 28 const packageJsonVersion = vscode
@@ -96,7 +96,7 @@ export class Config {
96 } 96 }
97 97
98 case "darwin": return "ra_lsp_server-mac"; 98 case "darwin": return "ra_lsp_server-mac";
99 case "win32": return "ra_lsp_server-windows.exe"; 99 case "win32": return "ra_lsp_server-windows.exe";
100 100
101 // Users on these platforms yet need to manually build from sources 101 // Users on these platforms yet need to manually build from sources
102 case "aix": 102 case "aix":
@@ -126,7 +126,7 @@ export class Config {
126 126
127 return { 127 return {
128 type: BinarySource.Type.GithubRelease, 128 type: BinarySource.Type.GithubRelease,
129 dir: this.ctx.globalStoragePath, 129 dir: this.ctx.globalStoragePath,
130 file: prebuiltBinaryName, 130 file: prebuiltBinaryName,
131 storage: this.ctx.globalState, 131 storage: this.ctx.globalState,
132 version: Config.extensionVersion, 132 version: Config.extensionVersion,
@@ -140,30 +140,30 @@ export class Config {
140 // We don't do runtime config validation here for simplicity. More on stackoverflow: 140 // We don't do runtime config validation here for simplicity. More on stackoverflow:
141 // https://stackoverflow.com/questions/60135780/what-is-the-best-way-to-type-check-the-configuration-for-vscode-extension 141 // https://stackoverflow.com/questions/60135780/what-is-the-best-way-to-type-check-the-configuration-for-vscode-extension
142 142
143 get highlightingOn() { return this.cfg.get("highlightingOn") as boolean; } 143 get highlightingOn() { return this.cfg.get("highlightingOn") as boolean; }
144 get rainbowHighlightingOn() { return this.cfg.get("rainbowHighlightingOn") as boolean; } 144 get rainbowHighlightingOn() { return this.cfg.get("rainbowHighlightingOn") as boolean; }
145 get lruCapacity() { return this.cfg.get("lruCapacity") as null | number; } 145 get lruCapacity() { return this.cfg.get("lruCapacity") as null | number; }
146 get displayInlayHints() { return this.cfg.get("displayInlayHints") as boolean; } 146 get displayInlayHints() { return this.cfg.get("displayInlayHints") as boolean; }
147 get maxInlayHintLength() { return this.cfg.get("maxInlayHintLength") as number; } 147 get maxInlayHintLength() { return this.cfg.get("maxInlayHintLength") as number; }
148 get excludeGlobs() { return this.cfg.get("excludeGlobs") as string[]; } 148 get excludeGlobs() { return this.cfg.get("excludeGlobs") as string[]; }
149 get useClientWatching() { return this.cfg.get("useClientWatching") as boolean; } 149 get useClientWatching() { return this.cfg.get("useClientWatching") as boolean; }
150 get featureFlags() { return this.cfg.get("featureFlags") as Record<string, boolean>; } 150 get featureFlags() { return this.cfg.get("featureFlags") as Record<string, boolean>; }
151 get rustfmtArgs() { return this.cfg.get("rustfmtArgs") as string[]; } 151 get rustfmtArgs() { return this.cfg.get("rustfmtArgs") as string[]; }
152 152
153 get cargoWatchOptions(): CargoWatchOptions { 153 get cargoWatchOptions(): CargoWatchOptions {
154 return { 154 return {
155 enable: this.cfg.get("cargo-watch.enable") as boolean, 155 enable: this.cfg.get("cargo-watch.enable") as boolean,
156 arguments: this.cfg.get("cargo-watch.arguments") as string[], 156 arguments: this.cfg.get("cargo-watch.arguments") as string[],
157 allTargets: this.cfg.get("cargo-watch.allTargets") as boolean, 157 allTargets: this.cfg.get("cargo-watch.allTargets") as boolean,
158 command: this.cfg.get("cargo-watch.command") as string, 158 command: this.cfg.get("cargo-watch.command") as string,
159 }; 159 };
160 } 160 }
161 161
162 get cargoFeatures(): CargoFeatures { 162 get cargoFeatures(): CargoFeatures {
163 return { 163 return {
164 noDefaultFeatures: this.cfg.get("cargoFeatures.noDefaultFeatures") as boolean, 164 noDefaultFeatures: this.cfg.get("cargoFeatures.noDefaultFeatures") as boolean,
165 allFeatures: this.cfg.get("cargoFeatures.allFeatures") as boolean, 165 allFeatures: this.cfg.get("cargoFeatures.allFeatures") as boolean,
166 features: this.cfg.get("cargoFeatures.features") as string[], 166 features: this.cfg.get("cargoFeatures.features") as string[],
167 }; 167 };
168 } 168 }
169 169