Skip to content

Commit

Permalink
Add cheatsheet developer docs (#1718)
Browse files Browse the repository at this point in the history
  • Loading branch information
pokey authored Jul 18, 2024
1 parent 279ec5f commit ba6cb54
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/contributing/cheatsheet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Cheatsheet

The cheatsheet can be activated locally to show your custom cheatsheet by saying `"cursorless cheatsheet"`, or visited on the web at https://www.cursorless.org/cheatsheet, which will show the default spoken forms.

The implementation of the local version of the cheatsheet is split between the Talon side and the extension side.

## Adding a new spoken form

When you add a new scope type, action, modifier, etc, you'll need to ensure that it shows up both locally and on the website. It will usually automatically show up in the local cheatsheet. You can verify this by saying `"cursorless cheatsheet"` with your development version of `cursorless-talon` active in your Talon user directory, and inspecting the cheatsheet that appears. If it does not, you'll need to make fixes to [the Talon side of the cheatsheet](../../cursorless-talon/src/cheatsheet).

In either case, to get your changes to appear on the website, you need to update the defaults in [`defaults.json`](../../packages/cheatsheet/src/lib/sampleSpokenFormInfos/defaults.json). First make sure you have the `cursorless-talon-dev` user file set in your Talon home directory, as indicated in the [initial contributor setup instructions](CONTRIBUTING.md#initial-setup). Then you can say `"cursorless update cheatsheet"` to update the default spoken forms. Note that this will use your custom spoken forms, so you may need to do some manual cleanup.

## Running the cheatsheet in development mode

To verify that your changes will work on the web cheatsheet, or if you need to make changes to the cheatsheet itself, such as updating the legend, you can run the cheatsheet locally using by running the following command:

```
pnpm -F cursorless-org dev
```

and then adding `/cheatsheet` to the preview URL. Changes should show up in realtime as you develop.

0 comments on commit ba6cb54

Please sign in to comment.