From 6c946c37b393c69082f8f4da8d6eea74cd1d9062 Mon Sep 17 00:00:00 2001 From: Pokey Rule <755842+pokey@users.noreply.github.com> Date: Mon, 30 Oct 2023 16:50:48 +0000 Subject: [PATCH] Cursorless scope side bar (#1942) - Depends on https://github.com/cursorless-dev/cursorless/pull/1941 - Depends on #1946 ## Checklist - [-] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) (see comment below) - [x] Add descriptions to section headings (eg present, not present, etc) - [x] File issue about using lang icons for lang-specific scopes - [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 - [x] File issue for showing scopes touching, as well as equal to, selection - [x] Checkboxes from original #1663 --- src/apps/cursorless_vscode.py | 6 ++++++ src/cheatsheet/sections/get_scope_visualizer.py | 10 ++++++++++ src/cursorless.py | 3 +++ src/cursorless.talon | 3 +++ 4 files changed, 22 insertions(+) diff --git a/src/apps/cursorless_vscode.py b/src/apps/cursorless_vscode.py index 1f6e43fe..0956c89d 100644 --- a/src/apps/cursorless_vscode.py +++ b/src/apps/cursorless_vscode.py @@ -32,3 +32,9 @@ def private_cursorless_show_settings_in_ide(): ) actions.sleep("250ms") actions.key("right") + + def private_cursorless_show_sidebar(): + """Show Cursorless sidebar""" + actions.user.private_cursorless_run_rpc_command_and_wait( + "workbench.view.extension.cursorless" + ) diff --git a/src/cheatsheet/sections/get_scope_visualizer.py b/src/cheatsheet/sections/get_scope_visualizer.py index b7483ae9..69115fbe 100644 --- a/src/cheatsheet/sections/get_scope_visualizer.py +++ b/src/cheatsheet/sections/get_scope_visualizer.py @@ -24,4 +24,14 @@ def get_scope_visualizer(): ], ], }, + { + "id": "show_scope_sidebar", + "type": "command", + "variations": [ + { + "spokenForm": "bar cursorless", + "description": "Show cursorless sidebar", + }, + ], + }, ] diff --git a/src/cursorless.py b/src/cursorless.py index 86147fb1..d6479121 100644 --- a/src/cursorless.py +++ b/src/cursorless.py @@ -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""" diff --git a/src/cursorless.talon b/src/cursorless.talon index 9b784f68..d2fa383a 100644 --- a/src/cursorless.talon +++ b/src/cursorless.talon @@ -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()