Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Commit

Permalink
Only show dependencies tree on Ruby projects (#1033)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistock authored Feb 16, 2024
1 parent ca55195 commit da3caa1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@
"name": "Dependencies",
"icon": "$(package)",
"description": "View and manage dependencies",
"contextualTitle": "Dependencies"
"contextualTitle": "Dependencies",
"when": "rubyLsp.activated"
}
]
},
Expand Down
4 changes: 4 additions & 0 deletions src/rubyLsp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ export class RubyLsp {

await workspace.start();
this.context.subscriptions.push(workspace);

// If we successfully activated a workspace, then we can start showing the dependencies tree view. This is necessary
// so that we can avoid showing it on non Ruby projects
vscode.commands.executeCommand("setContext", "rubyLsp.activated", true);
}

// Registers all extension commands. Commands can only be registered once, so this happens in the constructor. For
Expand Down

0 comments on commit da3caa1

Please sign in to comment.