-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`chuck glyph dollar red air` Fixes #54 ## Checklist - [x] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [x] 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) - [x] I have not broken the cheatsheet --------- Co-authored-by: Pokey Rule <[email protected]>
- Loading branch information
1 parent
5db7e7f
commit f5df6dc
Showing
5 changed files
with
76 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,25 @@ | ||
from ..get_list import get_lists | ||
from ..get_list import get_lists, get_raw_list | ||
|
||
|
||
def get_scopes(): | ||
return get_lists( | ||
["scope_type"], | ||
"scopeType", | ||
complex_scopes = get_raw_list("glyph_scope_type") | ||
return [ | ||
*get_lists( | ||
["scope_type"], | ||
"scopeType", | ||
{ | ||
"argumentOrParameter": "Argument", | ||
"boundedNonWhitespaceSequence": "Non whitespace sequence stopped by surrounding pair delimeters", | ||
}, | ||
), | ||
{ | ||
"argumentOrParameter": "Argument", | ||
"boundedNonWhitespaceSequence": "Non whitespace sequence stopped by surrounding pair delimeters", | ||
"id": "glyph", | ||
"type": "scopeType", | ||
"variations": [ | ||
{ | ||
"spokenForm": f"{complex_scopes['glyph']} <character>", | ||
"description": "Instance of single character <character>", | ||
}, | ||
], | ||
}, | ||
) | ||
] |
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,30 @@ | ||
from talon import Module | ||
|
||
mod = Module() | ||
|
||
mod.list( | ||
"cursorless_glyph_scope_type", | ||
desc="Cursorless glyph scope type", | ||
) | ||
mod.list( | ||
"cursorless_glyph_scope_type_plural", | ||
desc="Plural version of Cursorless glyph scope type", | ||
) | ||
|
||
|
||
@mod.capture(rule="{user.cursorless_glyph_scope_type} <user.any_alphanumeric_key>") | ||
def cursorless_glyph_scope_type(m) -> dict[str, str]: | ||
return { | ||
"type": "glyph", | ||
"character": m.any_alphanumeric_key, | ||
} | ||
|
||
|
||
@mod.capture( | ||
rule="{user.cursorless_glyph_scope_type_plural} <user.any_alphanumeric_key>" | ||
) | ||
def cursorless_glyph_scope_type_plural(m) -> dict[str, str]: | ||
return { | ||
"type": "glyph", | ||
"character": m.any_alphanumeric_key, | ||
} |
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