-
-
Notifications
You must be signed in to change notification settings - Fork 84
Add support for 'all' modifier for items within a collection #597
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 support for 'all' modifier for items within a collection #597
Conversation
Fixing/Running tests locally, still needing to close VSCode. Edit: Here's an example:
|
…Sommers/cursorless-vscode into issue-473-add-all-modifier
"type": "containingScope", | ||
"scopeType": m.cursorless_scope_type, | ||
"includeSiblings": m[0] == "every", | ||
"""Expand to every scope""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely open to putting this into another file, my python is a little weak as is my understanding of how it interacts with Talon. Just lmk.
|
||
@mod.capture(rule="[every] {user.cursorless_scope_type}") | ||
@mod.capture(rule="[(every|all)] {user.cursorless_scope_type}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nifty if we could put this into a capture against the set above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use a Talon list, no?
"modifier": { | ||
"type": "everyScope", | ||
"scopeType": m.cursorless_scope_type, | ||
"contiguousRange": m[0] == "all", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: re-add check on for items here
Looking at the test failures. A few notes to myself:
Trying to get the test transfomer running as well, will need to take a look later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this one's going to need some conflict resolution / tweaking to account for changes introduced in #672. I also appear to have some pending comments; not sure how relevant they still har
mod.list("select_multiple_modifiers", desc="modifiers for multiple selections") | ||
multiple_modifiers = {"every", "all"} | ||
ctx.lists["user.select_multiple_modifiers"] = multiple_modifiers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd argue that these terms should be csv-configurable
"modifier": { | ||
"type": "everyScope", | ||
"scopeType": m.cursorless_scope_type, | ||
"contiguousRange": m[0] == "all" and m[1] == "collectionItem", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we only support this one for collectionItem
?
I'm going to close this one for now, because:
Feel free to re-open if you wanna take a crack at it |
What
This PR addresses Issue 473 and adds support for the
"all"
modifier within a list.I'm pretty rusty on the
.ts
types side and also might be missing some context about castingRange
asSelection
and setting it. I think there is likely a more elegant way.Checklist