Skip to content

Commit

Permalink
knausj => community (#1914)
Browse files Browse the repository at this point in the history
Also tweaked unicode docs slightly while I was there

## Checklist

- [ ] I have added
[tests](https://www.cursorless.org/docs/contributing/test-case-recorder/)
- [ ] 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)
- [ ] I have not broken the cheatsheet
  • Loading branch information
pokey authored Sep 28, 2023
1 parent be61609 commit 128933a
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ There's too much new stuff in this release to fit in a highlights reel, so we'll
- Improve and unify selection updating behaviour to handle overlapping ranges [\#138](https://github.com/cursorless-dev/cursorless/issues/138)
- Duplicate symbols after VS Code update [\#111](https://github.com/cursorless-dev/cursorless/issues/111)
- Fold action not working properly with multiple list elements [\#39](https://github.com/cursorless-dev/cursorless/issues/39)
- The `clear` command clashes with Knausj commands [\#68](https://github.com/pokey/cursorless-talon/issues/68)
- The `clear` command clashes with community commands [\#68](https://github.com/pokey/cursorless-talon/issues/68)

**Closed issues:**

Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/architecture/hat-snapshots.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

In order to allow long chained command phrases, we take a snapshot of the hat token map at the start of a phrase and continue to use this map during the course of the entire phrase. This way you can be sure that any commands issued during the course of a single phrase that refer to a decorated token will continue to refer to the same logical token no matter what happens in the document during phrase execution. Note that the ranges of tokens will be kept current as the document changes so that they refer to the same logical range, but the same logical token will keep the same key in the hat token map over the course of a phrase.

To make this work, first the voice engine [touches](https://github.com/knausj85/knausj_talon/blob/e373780af16256ab8fd5638af32d97fa23c4c0fc/apps/vscode/command_client/command_client.py#L398) a file within the signals subdirectory of the command server communication directory after the phrase has been parsed but right before execution begins. Then cursorless will check the version of the signal file before it [reads](https://github.com/cursorless-dev/cursorless/blob/2a624888369d41b0531e472d001d63d09912c8aa/src/core/HatTokenMap.ts#L88) or [updates](https://github.com/cursorless-dev/cursorless/blob/0d1004bafc6764734bee62afbfbb02500630a264/src/core/HatTokenMap.ts#L70) the hat token map via the command server [signal API](https://github.com/pokey/command-server/blob/2b9f9ea2a38b6e95aa60ff9553a804165e527308/src/extension.ts#L29). If the signal has been emitted since the last time cursorless took a snapshot of the hat token map, it will take a new snapshot and continue to use that snapshot of the hats until the next time the signal is emitted. Note that the signal transmission is asynchronous so cursorless just needs to make sure to check the version of the signal before it either updates or reads the map.
To make this work, first the voice engine [touches](https://github.com/talonhub/community/blob/e373780af16256ab8fd5638af32d97fa23c4c0fc/apps/vscode/command_client/command_client.py#L398) a file within the signals subdirectory of the command server communication directory after the phrase has been parsed but right before execution begins. Then cursorless will check the version of the signal file before it [reads](https://github.com/cursorless-dev/cursorless/blob/2a624888369d41b0531e472d001d63d09912c8aa/src/core/HatTokenMap.ts#L88) or [updates](https://github.com/cursorless-dev/cursorless/blob/0d1004bafc6764734bee62afbfbb02500630a264/src/core/HatTokenMap.ts#L70) the hat token map via the command server [signal API](https://github.com/pokey/command-server/blob/2b9f9ea2a38b6e95aa60ff9553a804165e527308/src/extension.ts#L29). If the signal has been emitted since the last time cursorless took a snapshot of the hat token map, it will take a new snapshot and continue to use that snapshot of the hats until the next time the signal is emitted. Note that the signal transmission is asynchronous so cursorless just needs to make sure to check the version of the signal before it either updates or reads the map.

In the diagram below, we document the flow of a couple different cases. Dotted lines represent asynchronous / fire-and-forget communication:

Expand Down
2 changes: 1 addition & 1 deletion docs/user/experimental/snippets.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Note that each snippet can use `insertionScopeTypes` to indicate that it will au

As usual, the spoken forms for these snippets can be [customized by csv](../customization.md). The csvs are in the files in `cursorless-settings/experimental` with `snippet` in their name.

In addition, you can change the term `"snippet"` (for snippet insertion) using actions.csv. Keep in mind that if you change it to `"snip"`, you may want to turn off the built-in knausj `"snip"` commands to avoid conflicts.
In addition, you can change the term `"snippet"` (for snippet insertion) using actions.csv. Keep in mind that if you change it to `"snip"`, you may want to turn off the built-in community `"snip"` commands to avoid conflicts.

## Adding your own snippets

Expand Down
16 changes: 8 additions & 8 deletions docs/user/installation.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Installation

1. Install [Talon](https://talonvoice.com/)
2. Install [knausj_talon](https://github.com/knausj85/knausj_talon).
_(Or see [here](https://github.com/cursorless-dev/cursorless/wiki/Talon-home-requirements) if you prefer not to use knausj.)_
2. Install the [community Talon commands](https://github.com/talonhub/community).
_(Or see [here](https://github.com/cursorless-dev/cursorless/wiki/Talon-home-requirements) if you prefer not to use community.)_
3. Install [VSCode](https://code.visualstudio.com/)
4. Install the [VSCode talon extension pack](https://marketplace.visualstudio.com/items?itemName=pokey.talon)
5. Install the [Cursorless VSCode extension](https://marketplace.visualstudio.com/items?itemName=pokey.cursorless)
Expand All @@ -25,9 +25,9 @@ Alternatively, access the directory by right clicking the Talon icon in taskbar,
The folder structure should look something like the below:

```insert code:
~/.talon/user/knausj_talon
~/.talon/user/knausj_talon/apps
~/.talon/user/knausj_talon/code
~/.talon/user/community
~/.talon/user/community/apps
~/.talon/user/community/code
...
~/.talon/user/cursorless-talon
~/.talon/user/cursorless-talon/src
Expand All @@ -50,9 +50,9 @@ Alternatively, access the directory by right clicking the Talon icon in taskbar,
The folder structure should look something like the below:

```insert code:
%AppData%\Talon\user\knausj_talon
%AppData%\Talon\user\knausj_talon\apps
%AppData%\Talon\user\knausj_talon\code
%AppData%\Talon\user\community
%AppData%\Talon\user\community\apps
%AppData%\Talon\user\community\code
...
%AppData%\Talon\user\cursorless-talon
%AppData%\Talon\user\cursorless-talon\src
Expand Down
4 changes: 2 additions & 2 deletions docs/user/unicode.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ Cursorless has first-class support for Unicode. By default, when constructing ha
- Africa
- África

For Unicode symbols that are not letters, and that are not speakable in knausj, for example emoji, Chinese characters, etc, we have a special "character" called `"special"` that can be used. So for example, if there were a blue hat over a '😄' character, you could say `"take blue special"` to select it. As always, the spoken form `"special"` can be [customized](customization.md).
For Unicode symbols that are not letters, and that are not speakable by default, for example emoji, Chinese characters, etc, we have a special "character" called `"special"` that can be used. So for example, if there were a blue hat over a '😄' character, you could say `"take blue special"` to select it. As always, the spoken form `"special"` can be [customized](customization.md).

## Advanced customization

The above setup will allow you to refer to any Unicode token. However, if you have overridden your `<user.any_alphanumeric_key>` capture to contain characters other than lowercase letters and the default knausj symbols, you can tell Cursorless to be less aggressive with its normalization, so that it can allocate hats more efficiently.
The above setup will allow you to refer to any Unicode token, and is sufficient for most users. However, if you have overridden your `<user.any_alphanumeric_key>` capture to contain characters other than lowercase letters and the default symbols, you can tell Cursorless to be less aggressive with its normalization, so that it can allocate hats more efficiently. Note that this is not necessary in order to refer to these tokens; it just makes hat allocation slightly more efficient.

### Preserving case

Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/cursorlessCommandIds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const cursorlessCommandDescriptions: Record<
"Display the cursorless cheatsheet",
),
["cursorless.internal.updateCheatsheetDefaults"]: new HiddenCommand(
"Update the default values of the cheatsheet payload used on the website and for local development. Be sure to run this on stock knausj and cursorless.",
"Update the default values of the cheatsheet payload used on the website and for local development. Be sure to run this on stock community and cursorless.",
),
["cursorless.takeSnapshot"]: new HiddenCommand(
"Take a snapshot of the current editor state",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { matchAll } from "../util/regex";

/**
* A list of all symbols that are speakable by default in knausj.
* A list of all symbols that are speakable by default in community.
*/
const KNOWN_SYMBOLS = [
"!",
Expand Down
2 changes: 1 addition & 1 deletion packages/cursorless-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
},
{
"command": "cursorless.internal.updateCheatsheetDefaults",
"title": "Cursorless: Update the default values of the cheatsheet payload used on the website and for local development. Be sure to run this on stock knausj and cursorless.",
"title": "Cursorless: Update the default values of the cheatsheet payload used on the website and for local development. Be sure to run this on stock community and cursorless.",
"enablement": "false"
},
{
Expand Down

0 comments on commit 128933a

Please sign in to comment.