diff options
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r-- | editors/code/src/config.ts | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 3ade7e900..6db073bec 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -5,6 +5,12 @@ import { log } from "./util"; | |||
5 | 5 | ||
6 | const RA_LSP_DEBUG = process.env.__RA_LSP_SERVER_DEBUG; | 6 | const RA_LSP_DEBUG = process.env.__RA_LSP_SERVER_DEBUG; |
7 | 7 | ||
8 | export interface InlayHintOptions { | ||
9 | typeHints: boolean; | ||
10 | parameterHints: boolean; | ||
11 | maxLength: number | null; | ||
12 | } | ||
13 | |||
8 | export interface CargoWatchOptions { | 14 | export interface CargoWatchOptions { |
9 | enable: boolean; | 15 | enable: boolean; |
10 | arguments: string[]; | 16 | arguments: string[]; |
@@ -22,7 +28,8 @@ export class Config { | |||
22 | private static readonly requiresReloadOpts = [ | 28 | private static readonly requiresReloadOpts = [ |
23 | "cargoFeatures", | 29 | "cargoFeatures", |
24 | "cargo-watch", | 30 | "cargo-watch", |
25 | "highlighting.semanticTokens" | 31 | "highlighting.semanticTokens", |
32 | "inlayHints", | ||
26 | ] | 33 | ] |
27 | .map(opt => `${Config.rootSection}.${opt}`); | 34 | .map(opt => `${Config.rootSection}.${opt}`); |
28 | 35 | ||
@@ -149,8 +156,13 @@ export class Config { | |||
149 | get highlightingOn() { return this.cfg.get("highlightingOn") as boolean; } | 156 | get highlightingOn() { return this.cfg.get("highlightingOn") as boolean; } |
150 | get rainbowHighlightingOn() { return this.cfg.get("rainbowHighlightingOn") as boolean; } | 157 | get rainbowHighlightingOn() { return this.cfg.get("rainbowHighlightingOn") as boolean; } |
151 | get lruCapacity() { return this.cfg.get("lruCapacity") as null | number; } | 158 | get lruCapacity() { return this.cfg.get("lruCapacity") as null | number; } |
152 | get displayInlayHints() { return this.cfg.get("displayInlayHints") as boolean; } | 159 | get inlayHints(): InlayHintOptions { |
153 | get maxInlayHintLength() { return this.cfg.get("maxInlayHintLength") as number; } | 160 | return { |
161 | typeHints: this.cfg.get("inlayHints.typeHints") as boolean, | ||
162 | parameterHints: this.cfg.get("inlayHints.parameterHints") as boolean, | ||
163 | maxLength: this.cfg.get("inlayHints.maxLength") as null | number, | ||
164 | }; | ||
165 | } | ||
154 | get excludeGlobs() { return this.cfg.get("excludeGlobs") as string[]; } | 166 | get excludeGlobs() { return this.cfg.get("excludeGlobs") as string[]; } |
155 | get useClientWatching() { return this.cfg.get("useClientWatching") as boolean; } | 167 | get useClientWatching() { return this.cfg.get("useClientWatching") as boolean; } |
156 | get featureFlags() { return this.cfg.get("featureFlags") as Record<string, boolean>; } | 168 | get featureFlags() { return this.cfg.get("featureFlags") as Record<string, boolean>; } |