aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/config.ts
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-05-18 08:37:04 +0100
committerGitHub <[email protected]>2020-05-18 08:37:04 +0100
commitc6ed08967193cadc927dfaf422601bcd160a6fc9 (patch)
treeaaccb210353786d000a3455264e368b76f61ff98 /editors/code/src/config.ts
parent31611da2538e66027ea67482235f6b8659bedf09 (diff)
parent78817a319476d8af40c4f78e8c47dc958781f88f (diff)
Merge #4499
4499: CodeLens configuration options r=vsrs a=vsrs This PR - adds an option to granularly enable\disable all CodeLens, just like the TypeScript extension. - fixes a minor bug for doctests. It makes no sense to show `Debug` lens for them as cargo `Can't skip running doc tests with --no-run`. Co-authored-by: vsrs <[email protected]>
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r--editors/code/src/config.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index 1652827c3..ee294fbe3 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -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
@@ -119,4 +123,13 @@ export class Config {
119 sourceFileMap: sourceFileMap 123 sourceFileMap: sourceFileMap
120 }; 124 };
121 } 125 }
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 }
122} 135}