File tree Expand file tree Collapse file tree 3 files changed +77
-0
lines changed
cursorless-talon/src/cheatsheet
packages/cheatsheet/src/lib/sampleSpokenFormInfos Expand file tree Collapse file tree 3 files changed +77
-0
lines changed Original file line number Diff line number Diff line change 7
7
from .get_list import get_list , get_lists
8
8
from .sections .actions import get_actions
9
9
from .sections .compound_targets import get_compound_targets
10
+ from .sections .get_scope_visualizer import get_scope_visualizer
10
11
from .sections .modifiers import get_modifiers
11
12
from .sections .scopes import get_scopes
12
13
from .sections .special_marks import get_special_marks
@@ -102,6 +103,11 @@ def cursorless_cheat_sheet_get_json():
102
103
"id" : "scopes" ,
103
104
"items" : get_scopes (),
104
105
},
106
+ {
107
+ "name" : "Scope visualizer" ,
108
+ "id" : "scopeVisualizer" ,
109
+ "items" : get_scope_visualizer (),
110
+ },
105
111
{
106
112
"name" : "Modifiers" ,
107
113
"id" : "modifiers" ,
Original file line number Diff line number Diff line change
1
+ from ..get_list import get_list , get_raw_list , make_readable
2
+
3
+
4
+ def get_scope_visualizer ():
5
+ show_scope_visualizer = list (get_raw_list ("show_scope_visualizer" ).keys ())[0 ]
6
+ visualization_types = get_raw_list ("visualization_type" )
7
+
8
+ return [
9
+ * get_list ("hide_scope_visualizer" , "command" ),
10
+ {
11
+ "id" : "show_scope_visualizer" ,
12
+ "type" : "command" ,
13
+ "variations" : [
14
+ {
15
+ "spokenForm" : f"{ show_scope_visualizer } <scope>" ,
16
+ "description" : "Visualize <scope>" ,
17
+ },
18
+ * [
19
+ {
20
+ "spokenForm" : f"{ show_scope_visualizer } <scope> { spoken_form } " ,
21
+ "description" : f"Visualize <scope> { make_readable (id ).lower ()} range" ,
22
+ }
23
+ for spoken_form , id in visualization_types .items ()
24
+ ],
25
+ ],
26
+ },
27
+ ]
Original file line number Diff line number Diff line change 1030
1030
}
1031
1031
]
1032
1032
},
1033
+ {
1034
+ "name" : " Scope visualizer" ,
1035
+ "id" : " scopeVisualizer" ,
1036
+ "items" : [
1037
+ {
1038
+ "id" : " hideScopeVisualizer" ,
1039
+ "type" : " command" ,
1040
+ "variations" : [
1041
+ {
1042
+ "spokenForm" : " visualize nothing" ,
1043
+ "description" : " Hide scope visualizer"
1044
+ }
1045
+ ]
1046
+ },
1047
+ {
1048
+ "id" : " show_scope_visualizer" ,
1049
+ "type" : " command" ,
1050
+ "variations" : [
1051
+ {
1052
+ "spokenForm" : " visualize <scope>" ,
1053
+ "description" : " Visualize <scope>"
1054
+ },
1055
+ {
1056
+ "spokenForm" : " visualize <scope> removal" ,
1057
+ "description" : " Visualize <scope> removal range"
1058
+ },
1059
+ {
1060
+ "spokenForm" : " visualize <scope> iteration" ,
1061
+ "description" : " Visualize <scope> iteration range"
1062
+ }
1063
+ ]
1064
+ }
1065
+ ]
1066
+ },
1033
1067
{
1034
1068
"name" : " Scopes" ,
1035
1069
"id" : " scopes" ,
1374
1408
}
1375
1409
]
1376
1410
},
1411
+ {
1412
+ "id" : " sentence" ,
1413
+ "type" : " scopeType" ,
1414
+ "variations" : [
1415
+ {
1416
+ "spokenForm" : " sentence" ,
1417
+ "description" : " Sentence"
1418
+ }
1419
+ ]
1420
+ },
1377
1421
{
1378
1422
"id" : " statement" ,
1379
1423
"type" : " scopeType" ,
You can’t perform that action at this time.
0 commit comments