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

Added support for user define custom actions #125

Merged
merged 25 commits into from
Dec 14, 2021
Merged

Added support for user define custom actions #125

merged 25 commits into from
Dec 14, 2021

Conversation

AndreasArvidsson
Copy link
Member

@AndreasArvidsson AndreasArvidsson commented Dec 9, 2021

User defines their own spoken form a vscode command

Spoken form, Cursorless identifier
test, editor.action.commentLine

When spoken form is uttered:

  1. Set selection
  2. Runs command
  3. Restores selection

Also refactored the actions.py file. Now each type of action implementation has its own file and its own capture. This approach should make it easy to implement other type of actions like the quick menu items.

fixes #103

Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

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

LGTM with some minor comments

src/actions/actions_custom.py Outdated Show resolved Hide resolved
src/actions/actions_custom.py Outdated Show resolved Hide resolved
src/actions/actions_custom.py Show resolved Hide resolved
src/csv_overrides.py Outdated Show resolved Hide resolved
src/cursorless.talon Outdated Show resolved Hide resolved
src/actions/actions_custom.py Outdated Show resolved Hide resolved
src/actions/actions_makeshift.py Outdated Show resolved Hide resolved
@AndreasArvidsson
Copy link
Member Author

Ok it seems like we're both on the same page here. If we add additional columns to the custom actions csv we can actually migrate a lot of stuff there. All the makeshift actions and some regular ones like "paste to" uses the same implementation as custom actions.

@AndreasArvidsson
Copy link
Member Author

@pokey All make shift actions are now migrated to use the new execute command feature.

@pokey pokey added this to the 0.24.0 milestone Dec 12, 2021
Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

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

Looks good with a few comments. Does need documentation for both the new Python API and the new custom commands thing, though. I'd lean towards the former being in experimental docs and the latter in main docs? Or could put both in main docs

src/actions/actions.py Outdated Show resolved Hide resolved
src/actions/actions.py Outdated Show resolved Hide resolved
src/actions/actions.py Outdated Show resolved Hide resolved
src/actions/actions_makeshift.py Outdated Show resolved Hide resolved
src/csv_overrides.py Outdated Show resolved Hide resolved
AndreasArvidsson and others added 7 commits December 14, 2021 16:09
Co-authored-by: Pokey Rule <pokey.rule@gmail.com>
Co-authored-by: Pokey Rule <pokey.rule@gmail.com>
Co-authored-by: Pokey Rule <pokey.rule@gmail.com>
Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

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

Ok looking really good; left a bunch of doc suggestions

docs/custom-actions.md Outdated Show resolved Hide resolved
docs/custom-actions.md Outdated Show resolved Hide resolved
docs/custom-actions.md Outdated Show resolved Hide resolved
docs/custom-actions.md Outdated Show resolved Hide resolved
docs/custom-actions.md Outdated Show resolved Hide resolved
docs/public-api.md Outdated Show resolved Hide resolved
docs/public-api.md Outdated Show resolved Hide resolved
docs/public-api.md Outdated Show resolved Hide resolved
docs/public-api.md Outdated Show resolved Hide resolved
docs/public-api.md Outdated Show resolved Hide resolved
AndreasArvidsson and others added 9 commits December 14, 2021 18:42
Co-authored-by: Pokey Rule <pokey.rule@gmail.com>
Co-authored-by: Pokey Rule <pokey.rule@gmail.com>
Co-authored-by: Pokey Rule <pokey.rule@gmail.com>
Co-authored-by: Pokey Rule <pokey.rule@gmail.com>
Co-authored-by: Pokey Rule <pokey.rule@gmail.com>
Co-authored-by: Pokey Rule <pokey.rule@gmail.com>
Co-authored-by: Pokey Rule <pokey.rule@gmail.com>
Co-authored-by: Pokey Rule <pokey.rule@gmail.com>
Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

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

left a couple more suggestions

docs/customization.md Show resolved Hide resolved
docs/customization.md Outdated Show resolved Hide resolved
AndreasArvidsson and others added 3 commits December 14, 2021 18:56
Co-authored-by: Pokey Rule <pokey.rule@gmail.com>
Co-authored-by: Pokey Rule <pokey.rule@gmail.com>
@pokey pokey merged commit 9f8abfa into develop Dec 14, 2021
@pokey pokey deleted the custom_actions branch December 14, 2021 22:42
@pokey pokey mentioned this pull request Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants