Skip to content

Commit

Permalink
Cursorless scope side bar
Browse files Browse the repository at this point in the history
  • Loading branch information
pokey committed Oct 20, 2023
1 parent f2b7981 commit 2e23b01
Show file tree
Hide file tree
Showing 13 changed files with 381 additions and 17 deletions.
6 changes: 6 additions & 0 deletions cursorless-talon/src/apps/cursorless_vscode.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ def private_cursorless_show_settings_in_ide():
)
actions.sleep("250ms")
actions.insert("cursorless")

def private_cursorless_show_sidebar():
"""Show Cursorless sidebar"""
actions.user.private_cursorless_run_rpc_command_and_wait(
"workbench.view.extension.cursorless"
)
3 changes: 3 additions & 0 deletions cursorless-talon/src/cursorless.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@
class Actions:
def private_cursorless_show_settings_in_ide():
"""Show Cursorless-specific settings in ide"""

def private_cursorless_show_sidebar():
"""Show Cursorless-specific settings in ide"""
3 changes: 3 additions & 0 deletions cursorless-talon/src/cursorless.talon
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ tag: user.cursorless

{user.cursorless_homophone} settings:
user.private_cursorless_show_settings_in_ide()

bar {user.cursorless_homophone}:
user.private_cursorless_show_sidebar()
6 changes: 6 additions & 0 deletions images/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions packages/common/src/cursorlessCommandIds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ export const cursorlessCommandDescriptions: Record<
"Resume test case recording",
),
["cursorless.showDocumentation"]: new VisibleCommand("Show documentation"),
["cursorless.showScopeVisualizer"]: new VisibleCommand(
"Show the scope visualizer",
),
["cursorless.hideScopeVisualizer"]: new VisibleCommand(
"Hide the scope visualizer",
),

["cursorless.command"]: new HiddenCommand("The core cursorless command"),
["cursorless.showQuickPick"]: new HiddenCommand(
Expand Down Expand Up @@ -110,10 +116,4 @@ export const cursorlessCommandDescriptions: Record<
["cursorless.keyboard.modal.modeToggle"]: new HiddenCommand(
"Toggle the cursorless modal mode",
),
["cursorless.showScopeVisualizer"]: new HiddenCommand(
"Show the scope visualizer",
),
["cursorless.hideScopeVisualizer"]: new HiddenCommand(
"Hide the scope visualizer",
),
};
36 changes: 26 additions & 10 deletions packages/cursorless-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
],
"activationEvents": [
"onLanguage",
"onView:cursorless.scopes",
"onCommand:cursorless.command",
"onCommand:cursorless.internal.updateCheatsheetDefaults",
"onCommand:cursorless.keyboard.escape",
Expand Down Expand Up @@ -77,6 +78,14 @@
}
},
"contributes": {
"views": {
"cursorless": [
{
"id": "cursorless.scopes",
"name": "Scopes"
}
]
},
"commands": [
{
"command": "cursorless.toggleDecorations",
Expand Down Expand Up @@ -106,6 +115,14 @@
"command": "cursorless.showDocumentation",
"title": "Cursorless: Show documentation"
},
{
"command": "cursorless.showScopeVisualizer",
"title": "Cursorless: Show the scope visualizer"
},
{
"command": "cursorless.hideScopeVisualizer",
"title": "Cursorless: Hide the scope visualizer"
},
{
"command": "cursorless.command",
"title": "Cursorless: The core cursorless command",
Expand Down Expand Up @@ -175,16 +192,6 @@
"command": "cursorless.keyboard.modal.modeToggle",
"title": "Cursorless: Toggle the cursorless modal mode",
"enablement": "false"
},
{
"command": "cursorless.showScopeVisualizer",
"title": "Cursorless: Show the scope visualizer",
"enablement": "false"
},
{
"command": "cursorless.hideScopeVisualizer",
"title": "Cursorless: Hide the scope visualizer",
"enablement": "false"
}
],
"colors": [
Expand Down Expand Up @@ -1032,6 +1039,15 @@
"fontCharacter": "\\E900"
}
}
},
"viewsContainers": {
"activitybar": [
{
"id": "cursorless",
"title": "Cursorless",
"icon": "images/icon.svg"
}
]
}
},
"sponsor": {
Expand Down
Loading

0 comments on commit 2e23b01

Please sign in to comment.