aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/code/package.json15
-rw-r--r--editors/code/src/config.ts11
2 files changed, 26 insertions, 0 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index 2dbbde852..efed4c7f2 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -443,6 +443,21 @@
443 "type": "object", 443 "type": "object",
444 "default": {}, 444 "default": {},
445 "description": "Optional settings passed to the debug engine. Example:\n{ \"lldb\": { \"terminal\":\"external\"} }" 445 "description": "Optional settings passed to the debug engine. Example:\n{ \"lldb\": { \"terminal\":\"external\"} }"
446 },
447 "rust-analyzer.lens.run": {
448 "description": "Whether to show Run lens.",
449 "type": "boolean",
450 "default": true
451 },
452 "rust-analyzer.lens.debug": {
453 "description": "Whether to show Debug lens.",
454 "type": "boolean",
455 "default": true
456 },
457 "rust-analyzer.lens.implementations": {
458 "description": "Whether to show Implementations lens.",
459 "type": "boolean",
460 "default": true
446 } 461 }
447 } 462 }
448 }, 463 },
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index 1652827c3..93d9aa160 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -16,6 +16,9 @@ export class Config {
16 "files", 16 "files",
17 "highlighting", 17 "highlighting",
18 "updates.channel", 18 "updates.channel",
19 "lens.run",
20 "lens.debug",
21 "lens.implementations",
19 ] 22 ]
20 .map(opt => `${this.rootSection}.${opt}`); 23 .map(opt => `${this.rootSection}.${opt}`);
21 24
@@ -119,4 +122,12 @@ export class Config {
119 sourceFileMap: sourceFileMap 122 sourceFileMap: sourceFileMap
120 }; 123 };
121 } 124 }
125
126 get lens() {
127 return {
128 run: this.get<boolean>("lens.run"),
129 debug: this.get<boolean>("lens.debug"),
130 implementations: this.get<boolean>("lens.implementations"),
131 };
132 }
122} 133}