From dc217bdf90d555eaa1780041fc3a14e64173994d Mon Sep 17 00:00:00 2001 From: vsrs Date: Sun, 17 May 2020 19:51:44 +0300 Subject: CodeLens configuration options. --- editors/code/package.json | 15 +++++++++++++++ editors/code/src/config.ts | 11 +++++++++++ 2 files changed, 26 insertions(+) (limited to 'editors/code') 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 @@ "type": "object", "default": {}, "description": "Optional settings passed to the debug engine. Example:\n{ \"lldb\": { \"terminal\":\"external\"} }" + }, + "rust-analyzer.lens.run": { + "description": "Whether to show Run lens.", + "type": "boolean", + "default": true + }, + "rust-analyzer.lens.debug": { + "description": "Whether to show Debug lens.", + "type": "boolean", + "default": true + }, + "rust-analyzer.lens.implementations": { + "description": "Whether to show Implementations lens.", + "type": "boolean", + "default": true } } }, 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 { "files", "highlighting", "updates.channel", + "lens.run", + "lens.debug", + "lens.implementations", ] .map(opt => `${this.rootSection}.${opt}`); @@ -119,4 +122,12 @@ export class Config { sourceFileMap: sourceFileMap }; } + + get lens() { + return { + run: this.get("lens.run"), + debug: this.get("lens.debug"), + implementations: this.get("lens.implementations"), + }; + } } -- cgit v1.2.3