File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 465465 "default" : true ,
466466 "type" : " boolean"
467467 },
468+ "rust-analyzer.showDependenciesExplorer" : {
469+ "markdownDescription" : " Whether to show the dependencies view." ,
470+ "default" : true ,
471+ "type" : " boolean"
472+ },
468473 "$generated-start" : {},
469474 "rust-analyzer.assist.emitMustUse" : {
470475 "markdownDescription" : " Whether to insert #[must_use] when generating `as_` methods\n for enum variants." ,
20132018 {
20142019 "id" : " rustDependencies" ,
20152020 "name" : " Rust Dependencies" ,
2016- "when" : " inRustProject"
2021+ "when" : " inRustProject && config.rust-analyzer.showDependenciesExplorer "
20172022 }
20182023 ]
20192024 },
Original file line number Diff line number Diff line change @@ -284,6 +284,10 @@ export class Config {
284284 get useRustcErrorCode ( ) {
285285 return this . get < boolean > ( "diagnostics.useRustcErrorCode" ) ;
286286 }
287+
288+ get showDependenciesExplorer ( ) {
289+ return this . get < boolean > ( "showDependenciesExplorer" ) ;
290+ }
287291}
288292
289293// the optional `cb?` parameter is meant to be used to add additional
Original file line number Diff line number Diff line change @@ -263,7 +263,10 @@ export class Ctx {
263263 }
264264 await client . start ( ) ;
265265 this . updateCommands ( ) ;
266- this . prepareTreeDependenciesView ( client ) ;
266+
267+ if ( this . config . showDependenciesExplorer ) {
268+ this . prepareTreeDependenciesView ( client ) ;
269+ }
267270 }
268271
269272 private prepareTreeDependenciesView ( client : lc . LanguageClient ) {
You can’t perform that action at this time.
0 commit comments