Skip to content

Commit

Permalink
Collection item scope provider (#2683)
Browse files Browse the repository at this point in the history
Fixes #1059

Related #1052

## Checklist

- [x] I have added
[tests](https://www.cursorless.org/docs/contributing/test-case-recorder/)
- [/] I have updated the
[docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and
[cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet)
- [/] I have not broken the cheatsheet

---------

Co-authored-by: Phil Cohen <[email protected]>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 13, 2025
1 parent 071739d commit d98bf09
Show file tree
Hide file tree
Showing 81 changed files with 1,693 additions and 1,052 deletions.
6 changes: 6 additions & 0 deletions changelog/2025-01-addedCollectionItemScopeProvider.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
tags: [enhancement]
pullRequest: 2683
---

At long last, collection items have been migrated to our next generation scope framework! This means, within a list of items, you can now use relative navigation (`previous item`), absolute navigation via ordinals (`fifth item`), multiple selection (`two items`, optionally preceded with `previous` or `next`), and lastly, requesting multiple items to be individually selected via `every` (`every two items`)!
31 changes: 0 additions & 31 deletions data/fixtures/recorded/itemTextual/chuckItem4.yml

This file was deleted.

25 changes: 0 additions & 25 deletions data/fixtures/recorded/itemTextual/clearEveryItemToken.yml

This file was deleted.

23 changes: 0 additions & 23 deletions data/fixtures/recorded/itemTextual/clearItem10.yml

This file was deleted.

23 changes: 0 additions & 23 deletions data/fixtures/recorded/itemTextual/clearItem11.yml

This file was deleted.

23 changes: 0 additions & 23 deletions data/fixtures/recorded/itemTextual/clearItem13.yml

This file was deleted.

23 changes: 0 additions & 23 deletions data/fixtures/recorded/itemTextual/clearItem14.yml

This file was deleted.

23 changes: 0 additions & 23 deletions data/fixtures/recorded/itemTextual/clearItem6.yml

This file was deleted.

27 changes: 0 additions & 27 deletions data/fixtures/recorded/itemTextual/clearItemDrip.yml

This file was deleted.

6 changes: 2 additions & 4 deletions data/fixtures/recorded/languages/clojure/chuckItemZip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ finalState:
documentContents: |-
{
:foo "bar",
;; hello
,
}
selections:
- anchor: {line: 4, character: 1}
active: {line: 4, character: 1}
- anchor: {line: 2, character: 1}
active: {line: 2, character: 1}
5 changes: 2 additions & 3 deletions data/fixtures/recorded/languages/clojure/clearEveryItem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ finalState:
{
,
;; hello
,
}
selections:
- anchor: {line: 2, character: 4}
active: {line: 2, character: 4}
- anchor: {line: 4, character: 4}
active: {line: 4, character: 4}
- anchor: {line: 3, character: 4}
active: {line: 3, character: 4}
9 changes: 6 additions & 3 deletions data/fixtures/recorded/languages/clojure/clearItem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ initialState:
finalState:
documentContents: |-
{
:bongo {
:foo "bar",
,
}
}
selections:
- anchor: {line: 1, character: 4}
active: {line: 1, character: 4}
- anchor: {line: 3, character: 8}
active: {line: 3, character: 8}
2 changes: 1 addition & 1 deletion data/fixtures/recorded/languages/clojure/clearItemFine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ initialState:
start: {line: 0, character: 2}
end: {line: 0, character: 5}
finalState:
documentContents: "{ :baz \"whatever\"}"
documentContents: "{}"
selections:
- anchor: {line: 0, character: 1}
active: {line: 0, character: 1}
6 changes: 3 additions & 3 deletions data/fixtures/recorded/languages/rust/changeItemOne.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ initialState:
end: {line: 0, character: 21}
finalState:
documentContents: |
let x = [None, ];
let x = [None, Some()];
selections:
- anchor: {line: 0, character: 15}
active: {line: 0, character: 15}
- anchor: {line: 0, character: 20}
active: {line: 0, character: 20}
27 changes: 0 additions & 27 deletions data/fixtures/recorded/languages/typescript/takeItem4.yml

This file was deleted.

31 changes: 0 additions & 31 deletions data/fixtures/recorded/languages/typescript/takeItemComma.yml

This file was deleted.

Loading

0 comments on commit d98bf09

Please sign in to comment.