diff options
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r-- | editors/code/src/config.ts | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 110e54180..e8abf8284 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -8,7 +8,7 @@ export const NIGHTLY_TAG = "nightly"; | |||
8 | export class Config { | 8 | export class Config { |
9 | readonly extensionId = "matklad.rust-analyzer"; | 9 | readonly extensionId = "matklad.rust-analyzer"; |
10 | 10 | ||
11 | private readonly rootSection = "rust-analyzer"; | 11 | readonly rootSection = "rust-analyzer"; |
12 | private readonly requiresReloadOpts = [ | 12 | private readonly requiresReloadOpts = [ |
13 | "serverPath", | 13 | "serverPath", |
14 | "cargo", | 14 | "cargo", |
@@ -16,6 +16,10 @@ export class Config { | |||
16 | "files", | 16 | "files", |
17 | "highlighting", | 17 | "highlighting", |
18 | "updates.channel", | 18 | "updates.channel", |
19 | "lens.enable", | ||
20 | "lens.run", | ||
21 | "lens.debug", | ||
22 | "lens.implementations", | ||
19 | ] | 23 | ] |
20 | .map(opt => `${this.rootSection}.${opt}`); | 24 | .map(opt => `${this.rootSection}.${opt}`); |
21 | 25 | ||
@@ -94,6 +98,7 @@ export class Config { | |||
94 | 98 | ||
95 | get inlayHints() { | 99 | get inlayHints() { |
96 | return { | 100 | return { |
101 | enable: this.get<boolean>("inlayHints.enable"), | ||
97 | typeHints: this.get<boolean>("inlayHints.typeHints"), | 102 | typeHints: this.get<boolean>("inlayHints.typeHints"), |
98 | parameterHints: this.get<boolean>("inlayHints.parameterHints"), | 103 | parameterHints: this.get<boolean>("inlayHints.parameterHints"), |
99 | chainingHints: this.get<boolean>("inlayHints.chainingHints"), | 104 | chainingHints: this.get<boolean>("inlayHints.chainingHints"), |
@@ -108,10 +113,23 @@ export class Config { | |||
108 | } | 113 | } |
109 | 114 | ||
110 | get debug() { | 115 | get debug() { |
116 | // "/rustc/<id>" used by suggestions only. | ||
117 | const { ["/rustc/<id>"]: _, ...sourceFileMap } = this.get<Record<string, string>>("debug.sourceFileMap"); | ||
118 | |||
111 | return { | 119 | return { |
112 | engine: this.get<string>("debug.engine"), | 120 | engine: this.get<string>("debug.engine"), |
113 | sourceFileMap: this.get<Record<string, string>>("debug.sourceFileMap"), | 121 | engineSettings: this.get<object>("debug.engineSettings"), |
122 | openUpDebugPane: this.get<boolean>("debug.openUpDebugPane"), | ||
123 | sourceFileMap: sourceFileMap | ||
114 | }; | 124 | }; |
115 | } | 125 | } |
116 | 126 | ||
127 | get lens() { | ||
128 | return { | ||
129 | enable: this.get<boolean>("lens.enable"), | ||
130 | run: this.get<boolean>("lens.run"), | ||
131 | debug: this.get<boolean>("lens.debug"), | ||
132 | implementations: this.get<boolean>("lens.implementations"), | ||
133 | }; | ||
134 | } | ||
117 | } | 135 | } |