-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extending custom grammar with actions #492 ## 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: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Pokey Rule <[email protected]>
- Loading branch information
1 parent
ca57264
commit 4eca035
Showing
37 changed files
with
1,124 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
data/fixtures/recorded/actions/parsed/bigBringAirPlusCap.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
languageId: plaintext | ||
command: | ||
version: 7 | ||
spokenForm: big bring air plus cap | ||
action: | ||
name: parsed | ||
content: bring block <target1> after <target2> | ||
arguments: | ||
- type: primitive | ||
mark: {type: decoratedSymbol, symbolColor: default, character: a} | ||
- type: primitive | ||
mark: {type: decoratedSymbol, symbolColor: default, character: c} | ||
usePrePhraseSnapshot: true | ||
spokenFormError: Action 'parsed' | ||
initialState: | ||
documentContents: |- | ||
aaa | ||
bbb | ||
ccc | ||
ddd | ||
eee | ||
fff | ||
selections: | ||
- anchor: {line: 7, character: 3} | ||
active: {line: 7, character: 3} | ||
marks: | ||
default.a: | ||
start: {line: 0, character: 0} | ||
end: {line: 0, character: 3} | ||
default.c: | ||
start: {line: 3, character: 0} | ||
end: {line: 3, character: 3} | ||
finalState: | ||
documentContents: |- | ||
aaa | ||
bbb | ||
ccc | ||
ddd | ||
aaa | ||
bbb | ||
eee | ||
fff | ||
selections: | ||
- anchor: {line: 10, character: 3} | ||
active: {line: 10, character: 3} | ||
thatMark: | ||
- type: UntypedTarget | ||
contentRange: | ||
start: {line: 6, character: 0} | ||
end: {line: 7, character: 3} | ||
isReversed: false | ||
hasExplicitRange: true | ||
sourceMark: | ||
- type: UntypedTarget | ||
contentRange: | ||
start: {line: 0, character: 0} | ||
end: {line: 1, character: 3} | ||
isReversed: false | ||
hasExplicitRange: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
languageId: plaintext | ||
command: | ||
version: 7 | ||
spokenForm: destroy air | ||
action: | ||
name: parsed | ||
content: chuck block <target> | ||
arguments: | ||
- type: primitive | ||
mark: {type: decoratedSymbol, symbolColor: default, character: a} | ||
usePrePhraseSnapshot: true | ||
spokenFormError: Action 'parsed' | ||
initialState: | ||
documentContents: |- | ||
aaa | ||
bbb | ||
ccc | ||
ddd | ||
selections: | ||
- anchor: {line: 4, character: 3} | ||
active: {line: 4, character: 3} | ||
marks: | ||
default.a: | ||
start: {line: 0, character: 0} | ||
end: {line: 0, character: 3} | ||
finalState: | ||
documentContents: |- | ||
ccc | ||
ddd | ||
selections: | ||
- anchor: {line: 1, character: 3} | ||
active: {line: 1, character: 3} | ||
thatMark: | ||
- type: RawSelectionTarget | ||
contentRange: | ||
start: {line: 0, character: 0} | ||
end: {line: 0, character: 0} | ||
isReversed: false | ||
hasExplicitRange: true |
69 changes: 69 additions & 0 deletions
69
data/fixtures/recorded/actions/parsed/destroyAirAndEachPastGust.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
languageId: plaintext | ||
command: | ||
version: 7 | ||
spokenForm: destroy air and each past gust | ||
action: | ||
name: parsed | ||
content: chuck block <target> | ||
arguments: | ||
- type: list | ||
elements: | ||
- type: primitive | ||
mark: {type: decoratedSymbol, symbolColor: default, character: a} | ||
- type: range | ||
anchor: | ||
type: primitive | ||
mark: {type: decoratedSymbol, symbolColor: default, character: e} | ||
active: | ||
type: primitive | ||
mark: {type: decoratedSymbol, symbolColor: default, character: g} | ||
excludeAnchor: false | ||
excludeActive: false | ||
usePrePhraseSnapshot: true | ||
spokenFormError: Action 'parsed' | ||
initialState: | ||
documentContents: |- | ||
aaa | ||
bbb | ||
ccc | ||
ddd | ||
eee | ||
fff | ||
ggg | ||
hhh | ||
selections: | ||
- anchor: {line: 10, character: 3} | ||
active: {line: 10, character: 3} | ||
marks: | ||
default.a: | ||
start: {line: 0, character: 0} | ||
end: {line: 0, character: 3} | ||
default.e: | ||
start: {line: 6, character: 0} | ||
end: {line: 6, character: 3} | ||
default.g: | ||
start: {line: 9, character: 0} | ||
end: {line: 9, character: 3} | ||
finalState: | ||
documentContents: |- | ||
ccc | ||
ddd | ||
selections: | ||
- anchor: {line: 1, character: 3} | ||
active: {line: 1, character: 3} | ||
thatMark: | ||
- type: RawSelectionTarget | ||
contentRange: | ||
start: {line: 0, character: 0} | ||
end: {line: 0, character: 0} | ||
isReversed: false | ||
hasExplicitRange: true | ||
- type: RawSelectionTarget | ||
contentRange: | ||
start: {line: 1, character: 3} | ||
end: {line: 1, character: 3} | ||
isReversed: false | ||
hasExplicitRange: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
languageId: plaintext | ||
command: | ||
version: 7 | ||
spokenForm: destruction | ||
action: | ||
name: parsed | ||
content: chuck block | ||
arguments: [] | ||
usePrePhraseSnapshot: true | ||
spokenFormError: Action 'parsed' | ||
initialState: | ||
documentContents: |- | ||
aaa | ||
bbb | ||
ccc | ||
ddd | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} | ||
marks: {} | ||
finalState: | ||
documentContents: |- | ||
ccc | ||
ddd | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} | ||
thatMark: | ||
- type: RawSelectionTarget | ||
contentRange: | ||
start: {line: 0, character: 0} | ||
end: {line: 0, character: 0} | ||
isReversed: false | ||
hasExplicitRange: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.