]> git.lizzy.rs Git - rust.git/blobdiff - editors/code/src/config.ts
Introduce `toggle inlay hints` vscode command
[rust.git] / editors / code / src / config.ts
index 24002483d4410e2ffa25d0207564118dc3046a7f..e8abf8284eb7380c8f641f369c5c006fcba8c776 100644 (file)
@@ -8,7 +8,7 @@ export const NIGHTLY_TAG = "nightly";
 export class Config {
     readonly extensionId = "matklad.rust-analyzer";
 
-    private readonly rootSection = "rust-analyzer";
+    readonly rootSection = "rust-analyzer";
     private readonly requiresReloadOpts = [
         "serverPath",
         "cargo",
@@ -16,6 +16,10 @@ export class Config {
         "files",
         "highlighting",
         "updates.channel",
+        "lens.enable",
+        "lens.run",
+        "lens.debug",
+        "lens.implementations",
     ]
         .map(opt => `${this.rootSection}.${opt}`);
 
@@ -116,8 +120,16 @@ export class Config {
             engine: this.get<string>("debug.engine"),
             engineSettings: this.get<object>("debug.engineSettings"),
             openUpDebugPane: this.get<boolean>("debug.openUpDebugPane"),
-            sourceFileMap: sourceFileMap,
-            useLaunchJson: this.get<object>("debug.useLaunchJson"),
+            sourceFileMap: sourceFileMap
+        };
+    }
+
+    get lens() {
+        return {
+            enable: this.get<boolean>("lens.enable"),
+            run: this.get<boolean>("lens.run"),
+            debug: this.get<boolean>("lens.debug"),
+            implementations: this.get<boolean>("lens.implementations"),
         };
     }
 }