Skip to content

Commit 8cae134

Browse files
committed
Cursorless scope side bar
1 parent 82a8ef5 commit 8cae134

File tree

13 files changed

+384
-17
lines changed

13 files changed

+384
-17
lines changed

cursorless-talon/src/apps/cursorless_vscode.py

+6
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,9 @@ def private_cursorless_show_settings_in_ide():
3232
)
3333
actions.sleep("250ms")
3434
actions.insert("cursorless")
35+
36+
def private_cursorless_show_sidebar():
37+
"""Show Cursorless sidebar"""
38+
actions.user.private_cursorless_run_rpc_command_and_wait(
39+
"workbench.view.extension.cursorless"
40+
)

cursorless-talon/src/cursorless.py

+3
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@
1212
class Actions:
1313
def private_cursorless_show_settings_in_ide():
1414
"""Show Cursorless-specific settings in ide"""
15+
16+
def private_cursorless_show_sidebar():
17+
"""Show Cursorless-specific settings in ide"""

cursorless-talon/src/cursorless.talon

+3
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ tag: user.cursorless
4040

4141
{user.cursorless_homophone} settings:
4242
user.private_cursorless_show_settings_in_ide()
43+
44+
bar {user.cursorless_homophone}:
45+
user.private_cursorless_show_sidebar()

images/icon.svg

+6
Loading

packages/common/src/cursorlessCommandIds.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ export const cursorlessCommandDescriptions: Record<
6969
"Resume test case recording",
7070
),
7171
["cursorless.showDocumentation"]: new VisibleCommand("Show documentation"),
72+
["cursorless.showScopeVisualizer"]: new VisibleCommand(
73+
"Show the scope visualizer",
74+
),
75+
["cursorless.hideScopeVisualizer"]: new VisibleCommand(
76+
"Hide the scope visualizer",
77+
),
7278

7379
["cursorless.command"]: new HiddenCommand("The core cursorless command"),
7480
["cursorless.showQuickPick"]: new HiddenCommand(
@@ -110,10 +116,4 @@ export const cursorlessCommandDescriptions: Record<
110116
["cursorless.keyboard.modal.modeToggle"]: new HiddenCommand(
111117
"Toggle the cursorless modal mode",
112118
),
113-
["cursorless.showScopeVisualizer"]: new HiddenCommand(
114-
"Show the scope visualizer",
115-
),
116-
["cursorless.hideScopeVisualizer"]: new HiddenCommand(
117-
"Hide the scope visualizer",
118-
),
119119
};

packages/cursorless-vscode/package.json

+26-10
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
],
4747
"activationEvents": [
4848
"onLanguage",
49+
"onView:cursorless.scopes",
4950
"onCommand:cursorless.command",
5051
"onCommand:cursorless.internal.updateCheatsheetDefaults",
5152
"onCommand:cursorless.keyboard.escape",
@@ -77,6 +78,14 @@
7778
}
7879
},
7980
"contributes": {
81+
"views": {
82+
"cursorless": [
83+
{
84+
"id": "cursorless.scopes",
85+
"name": "Scopes"
86+
}
87+
]
88+
},
8089
"commands": [
8190
{
8291
"command": "cursorless.toggleDecorations",
@@ -106,6 +115,14 @@
106115
"command": "cursorless.showDocumentation",
107116
"title": "Cursorless: Show documentation"
108117
},
118+
{
119+
"command": "cursorless.showScopeVisualizer",
120+
"title": "Cursorless: Show the scope visualizer"
121+
},
122+
{
123+
"command": "cursorless.hideScopeVisualizer",
124+
"title": "Cursorless: Hide the scope visualizer"
125+
},
109126
{
110127
"command": "cursorless.command",
111128
"title": "Cursorless: The core cursorless command",
@@ -175,16 +192,6 @@
175192
"command": "cursorless.keyboard.modal.modeToggle",
176193
"title": "Cursorless: Toggle the cursorless modal mode",
177194
"enablement": "false"
178-
},
179-
{
180-
"command": "cursorless.showScopeVisualizer",
181-
"title": "Cursorless: Show the scope visualizer",
182-
"enablement": "false"
183-
},
184-
{
185-
"command": "cursorless.hideScopeVisualizer",
186-
"title": "Cursorless: Hide the scope visualizer",
187-
"enablement": "false"
188195
}
189196
],
190197
"colors": [
@@ -1032,6 +1039,15 @@
10321039
"fontCharacter": "\\E900"
10331040
}
10341041
}
1042+
},
1043+
"viewsContainers": {
1044+
"activitybar": [
1045+
{
1046+
"id": "cursorless",
1047+
"title": "Cursorless",
1048+
"icon": "images/icon.svg"
1049+
}
1050+
]
10351051
}
10361052
},
10371053
"sponsor": {

0 commit comments

Comments
 (0)