Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vscode command to search for views by name #1390

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/vscode/vscode.talon
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ please [<user.text>]:
user.vscode("workbench.action.showCommands")
insert(user.text or "")

view [<user.text>]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this make more sense as a .talon-list, rather than user.text? Seems like it would be more reliable, with the downside of needing to add an entry for each view.

Copy link
Contributor Author

@jaresty jaresty Apr 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer the text option because I'm using it to discover views I doing know about. It's kind of like "please" for searching views. If I had to delineate all the options, it would be less useful to me. There are several commands already for toggling bars and panels and such but there isn't such a convenient view search option yet (imo).

One nice thing about the generic search is that it also works with whatever extensions users have installed. A fixed list would require the user to override since we wouldn't want to include extensions in the community generic list.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with this, but I think we should prefix the command with "go"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with that.

user.vscode("workbench.action.openView")
insert(user.text or "")

# Sidebar
bar explore: user.vscode("workbench.view.explorer")
bar extensions: user.vscode("workbench.view.extensions")
Expand Down