-
-
Notifications
You must be signed in to change notification settings - Fork 84
Added text based item scope #709
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
Conversation
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.
As discussed, let's aim to
- Support lists with a single item (ie no comma appears inside the parens)
- Reuse the existing
collectionItem
modifier
Ideally we'd reuse existing code from generateUnmatchedDelimiters
as well, but prob not a showstopper given this file is well contained, not too long, and will probably be reworked after #484
1c75319
to
2be775a
Compare
Performed git surgery. Original branch at https://github.com/cursorless-dev/cursorless/tree/bak/textTheBasedItemScope; feel free to delete if this branch looks ok |
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 updated code causes type checker to be upset; I'll hold off reviewing till you get a chance to take a look
@pokey The tests are now clearing locally |
…scode into textTheBasedItemScope
plan:
|
@pokey All languages that can are now relying on the text based implementation and I have added a bunch of new tests |
I have now added python specific implementation for item in import list |
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.
Ok this looks pretty good! I made some tweaks in #823, and see inline comments. Note that tests are failing in #823 because I added a couple test cases to capture desired behaviour.
I'm obviously not in love with the code duplication with surrounding pairs, but we can revisit that when we refactor surrounding pairs as part of #484
src/test/suite/fixtures/recorded/languages/typescript/clearItemBrace.yml
Show resolved
Hide resolved
…sorless into textTheBasedItemScope
This reverts commit 95acb52.
…sorless into textTheBasedItemScope
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 good! Down to the last few minor comments and then let's ship it
Co-authored-by: Pokey Rule <[email protected]>
Co-authored-by: Pokey Rule <[email protected]>
Co-authored-by: Pokey Rule <[email protected]>
@pokey Your latest change requests are now implemented |
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.
Ok I made a couple of final tweaks in 0791c3e. If they look good to you merge away!
Fixes #357
Fixes #566
Fixes #441
Fixes #294
If we replace the language based implementation with the text based one like we did for string we can close a lot of language specific issues with item
Checklist