Commit 86da9f4
Add userColor3 and userColor4 hat colors (#3206)
## Add userColor3 and userColor4 hat colors
### Summary
Add two additional user-configurable hat colors (`userColor3` and
`userColor4`) to Cursorless. Currently only 2 user-defined colors exist
(`userColor1`/navy and `userColor2`/apricot), I use 4 colors and as a
result am building the extension locally from my personal fork. Would be
great if that step wasn't necessary.
### Changes
- **Talon**: Added `userColor3` and `userColor4` to color enablement
defaults and spoken forms
(`cursorless-talon/src/marks/decorated_mark.py`,
`cursorless-talon/src/spoken_forms.json`)
- **Type definitions**: Extended `HatColor` union type in all legacy
command type files (V0V1, V2, V3)
- **Spoken form generation**: Added default spoken form mappings for the
new colors
(`cursorless-engine/src/generateSpokenForm/defaultSpokenForms/marks.ts`)
- **VS Code extension**: Added the new colors to all relevant
`package.json` settings — light/dark color values, hat enablement
booleans, hat penalties, and color enum list. Default colors: olive
green (`#6b8e23`) and light gray (`#e0e0e0`)
- **Hat styles**: Added to the `HAT_COLORS` const array
(`hatStyles.types.ts`)
- **Docs**: Updated the user-facing color table in `README.md`
Both new colors are **disabled by default**, matching the pattern of
`userColor1`/`userColor2`.
## Test plan
- [x] Verify VS Code loads without errors with default settings
- [x] Enable `userColor3` and `userColor4` in settings and confirm hats
render with the configured colors
- [ ] Assign custom spoken form names to the new colors (e.g., "white" →
`userColor3`, "black" → `userColor4`) since the defaults are placeholder
names — users must name their colors to use them
- [x] Confirm existing colors (including userColor1/userColor2) are
unaffected
- [x] Run existing test suite
---------
Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>1 parent baff848 commit 86da9f4
9 files changed
Lines changed: 69 additions & 19 deletions
File tree
- cursorless-talon/src
- marks
- packages
- common/src/types/command/legacy
- cursorless-engine/src/generateSpokenForm/defaultSpokenForms
- cursorless-org-docs/src/docs/user
- cursorless-vscode
- src/ide/vscode
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
249 | 251 | | |
250 | 252 | | |
251 | 253 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
430 | 436 | | |
431 | 437 | | |
432 | 438 | | |
| |||
437 | 443 | | |
438 | 444 | | |
439 | 445 | | |
440 | | - | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
441 | 449 | | |
442 | 450 | | |
443 | 451 | | |
| |||
469 | 477 | | |
470 | 478 | | |
471 | 479 | | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
472 | 486 | | |
473 | 487 | | |
474 | 488 | | |
| |||
479 | 493 | | |
480 | 494 | | |
481 | 495 | | |
482 | | - | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
483 | 499 | | |
484 | 500 | | |
485 | 501 | | |
| |||
700 | 716 | | |
701 | 717 | | |
702 | 718 | | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
703 | 725 | | |
704 | 726 | | |
705 | 727 | | |
| |||
709 | 731 | | |
710 | 732 | | |
711 | 733 | | |
712 | | - | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
713 | 737 | | |
714 | 738 | | |
715 | 739 | | |
| |||
792 | 816 | | |
793 | 817 | | |
794 | 818 | | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
795 | 825 | | |
796 | 826 | | |
797 | 827 | | |
| |||
801 | 831 | | |
802 | 832 | | |
803 | 833 | | |
804 | | - | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
805 | 837 | | |
806 | 838 | | |
807 | 839 | | |
| |||
1106 | 1138 | | |
1107 | 1139 | | |
1108 | 1140 | | |
1109 | | - | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
1110 | 1144 | | |
1111 | 1145 | | |
1112 | 1146 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
0 commit comments