diff options
| author | David Barsky <me@davidbarsky.com> | 2023-05-26 11:50:07 -0400 |
|---|---|---|
| committer | David Barsky <me@davidbarsky.com> | 2023-05-26 11:50:07 -0400 |
| commit | 7dfef85be64a574577a2b7fe4d169e42503f0297 (patch) | |
| tree | 8dec8b68f7bfb5f0df13fabc09414e24c39d0e45 /editors/code/src | |
| parent | eee6872647fff3d168149e015264673c44b5b062 (diff) | |
| download | rust-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.ts | 4 | ||||
| -rw-r--r-- | editors/code/src/ctx.ts | 5 |
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) { |
