about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
authorDavid Barsky <me@davidbarsky.com>2023-05-26 11:50:07 -0400
committerDavid Barsky <me@davidbarsky.com>2023-05-26 11:50:07 -0400
commit7dfef85be64a574577a2b7fe4d169e42503f0297 (patch)
tree8dec8b68f7bfb5f0df13fabc09414e24c39d0e45 /editors/code/src
parenteee6872647fff3d168149e015264673c44b5b062 (diff)
downloadrust-7dfef85be64a574577a2b7fe4d169e42503f0297.tar.gz
rust-7dfef85be64a574577a2b7fe4d169e42503f0297.zip
fix: add a toggle to disable the dependency explorer.
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/config.ts4
-rw-r--r--editors/code/src/ctx.ts5
2 files changed, 8 insertions, 1 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index d6b8cc7a56a..c6d2bcc2b2a 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -284,6 +284,10 @@ export class Config {
     get useRustcErrorCode() {
         return this.get<boolean>("diagnostics.useRustcErrorCode");
     }
+
+    get showDependenciesExplorer() {
+        return this.get<boolean>("showDependenciesExplorer");
+    }
 }
 
 // the optional `cb?` parameter is meant to be used to add additional
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts
index 8bed74b88ea..a72b5391ff1 100644
--- a/editors/code/src/ctx.ts
+++ b/editors/code/src/ctx.ts
@@ -263,7 +263,10 @@ export class Ctx {
         }
         await client.start();
         this.updateCommands();
-        this.prepareTreeDependenciesView(client);
+
+        if (this.config.showDependenciesExplorer) {
+            this.prepareTreeDependenciesView(client);
+        }
     }
 
     private prepareTreeDependenciesView(client: lc.LanguageClient) {