Monorepo for Aesthetic.Computer aesthetic.computer
at main 493 lines 14 kB view raw view rendered
1# VS Code Theme Development Plan 2 3**Goal:** Create custom VS Code color themes based on Aesthetic Computer's prompt.mjs dark and light modes, shipping them with the existing `aesthetic-computer-code` extension. 4 5## 📊 Current State 6 7### Existing Extension Structure 8``` 9vscode-extension/ 10├── package.json # Extension manifest 11├── extension.ts # Main extension code 12├── syntaxes/ # TextMate grammars 13│ ├── PeaceScript.tmGrammar.json 14│ ├── pjs-configuration.json 15│ ├── KidLisp.tmGrammar.json ✨ NEW 16│ └── kidlisp-configuration.json ✨ NEW 17├── resources/ # Icons and images 18├── main.css # Webview styles 19└── out/ # Compiled output 20``` 21 22### Language Support 23| Language | Extension | Grammar | 24|----------|-----------|---------| 25| JavaScript | `.mjs` | VS Code built-in | 26| PeaceScript | `.pjs` | `source.pjs` | 27| **KidLisp** | `.lisp` | `source.kidlisp` ✨ | 28 29### Source Color Schemes (from [prompt.mjs](../system/public/aesthetic.computer/disks/prompt.mjs#L6538)) 30 31**Dark Mode:** 32| Property | Value | Description | 33|----------|-------|-------------| 34| `text` | `[255, 100]` | White with alpha | 35| `background` | `[70, 50, 100]` | Purple-indigo | 36| `prompt` | `[200, 30, 100, 200]` | Pink-magenta | 37| `block` | `[200, 30, 100]` | Pink cursor block | 38| `highlight` | `[255, 100, 0]` | Orange selection | 39| `guideline` | `[0, 0, 255, 64]` | Blue guidelines | 40| `auto` | `"white"` | Autocomplete | 41| `statusColor` | `"lime"` | Status indicators | 42| `focusOutline` | `"brown"` | Focus rings | 43 44**Light Mode:** 45| Property | Value | Description | 46|----------|-------|-------------| 47| `text` | `[40, 30, 90]` | Dark purple-blue | 48| `background` | `[252, 247, 197]` | Legal pad yellow | 49| `prompt` | `[60, 40, 120]` | Dark purple | 50| `block` | `[56, 122, 223]` | Blue cursor block | 51| `highlight` | `[246, 253, 195]` | Pale yellow selection | 52| `guideline` | `[255, 207, 105]` | Gold guidelines | 53| `auto` | `"red"` | Autocomplete | 54| `statusColor` | `"darkgreen"` | Status indicators | 55| `focusOutline` | `"aqua"` | Focus rings | 56 57### KidLisp Syntax Highlighting Colors (from [kidlisp.mjs](../system/public/aesthetic.computer/lib/kidlisp.mjs#L10268)) 58| Token Type | Color | Notes | 59|------------|-------|-------| 60| Comments (`;`) | gray | | 61| Strings | yellow | Quoted text | 62| Numbers | pink | General numeric | 63| RGB R channel | red | RGB value context | 64| RGB G channel | green | RGB value context | 65| RGB B channel | deepskyblue | RGB value context | 66| Timing (s/f) | yellow | `1s`, `0.5s`, `3f` | 67| Active timing | red/lime | Blinking states | 68| $codes | lime/limegreen | Embedded layers | 69| #codes | magenta/orange | Painting refs | 70| `rainbow` | RAINBOW | Special marker | 71| `zebra` | ZEBRA | Special marker | 72| Parentheses | Rainbow nested | Depth-based colors | 73| Functions | Context-dependent | | 74 75--- 76 77## � KidLisp Syntax Highlighting (NEW) 78 79The extension now includes full KidLisp syntax highlighting for `.lisp` files! 80 81### KidLisp Token Scopes 82 83| Token Type | TextMate Scope | Example | 84|------------|----------------|---------| 85| Comments | `comment.line.semicolon.kidlisp` | `; comment` | 86| Strings | `string.quoted.double/single.kidlisp` | `"hello"` `'world'` | 87| Timing (cycle) | `constant.numeric.timing.cycle.kidlisp` | `1s...` `2f...` | 88| Timing (delay) | `constant.numeric.timing.delay.kidlisp` | `0.5s` `3f` `1s!` | 89| $codes | `variable.other.embedded.kidlisp` | `$abc123` | 90| #codes | `entity.name.tag.painting.kidlisp` | `#WDv` | 91| Colors | `support.constant.color.kidlisp` | `red` `lime` `deepskyblue` | 92| Special | `support.constant.rainbow.kidlisp` | `rainbow` `zebra` | 93| Built-ins | `variable.language.builtin.kidlisp` | `width` `height` `frame` | 94| Graphics funcs | `entity.name.function.graphics.kidlisp` | `wipe` `ink` `line` `box` | 95| Control funcs | `entity.name.function.control.kidlisp` | `def` `repeat` `tap` `jump` | 96| Math funcs | `entity.name.function.math.kidlisp` | `wiggle` `sin` `random` | 97| Numbers | `constant.numeric.*.kidlisp` | `42` `-3.14` | 98| Operators | `keyword.operator.kidlisp` | `+` `-` `*` `/` | 99| Parentheses | `punctuation.paren.*.kidlisp` | `(` `)` | 100 101### Example KidLisp with Highlighting 102 103```lisp 104; 🎨 Rainbow circles 105(wipe "navy") ; comment = gray 106(def size 50) ; def = cyan, number = pink 107(repeat 10 i ; repeat = cyan, i = orange 108 (ink rainbow) ; ink = cyan, rainbow = special 109 (circle 110 (* i 30) ; operator = yellow 111 (+ height/2 (wiggle 20)) ; height = blue, wiggle = magenta 112 size)) 113(1s... (zoom 1.01)) ; timing = yellow 114``` 115 116--- 117 118## �🎯 Implementation Plan 119 120### Phase 1: Theme File Structure 121 122Create theme JSON files in the extension: 123 124``` 125vscode-extension/ 126├── themes/ 127│ ├── aesthetic-dark-color-theme.json 128│ └── aesthetic-light-color-theme.json 129├── package.json (updated with theme contributions) 130└── ... 131``` 132 133### Phase 2: Package.json Theme Contribution 134 135Add to `contributes` section: 136 137```json 138{ 139 "contributes": { 140 "themes": [ 141 { 142 "label": "Aesthetic Computer Dark", 143 "uiTheme": "vs-dark", 144 "path": "./themes/aesthetic-dark-color-theme.json" 145 }, 146 { 147 "label": "Aesthetic Computer Light", 148 "uiTheme": "vs", 149 "path": "./themes/aesthetic-light-color-theme.json" 150 } 151 ] 152 } 153} 154``` 155 156### Phase 3: Dark Theme Colors 157 158**Workbench Colors (`colors` section):** 159```json 160{ 161 "type": "dark", 162 "name": "Aesthetic Computer Dark", 163 "colors": { 164 "editor.background": "#46326e", 165 "editor.foreground": "#ffffff99", 166 "editorCursor.foreground": "#c81e64", 167 "editor.lineHighlightBackground": "#c81e6420", 168 "editor.selectionBackground": "#ff640080", 169 "activityBar.background": "#2d1f47", 170 "sideBar.background": "#3a2959", 171 "statusBar.background": "#00ff00", 172 "titleBar.activeBackground": "#46326e", 173 "panel.background": "#3a2959", 174 "terminal.background": "#46326e", 175 "terminal.foreground": "#ffffff" 176 } 177} 178``` 179 180### Phase 4: Light Theme Colors 181 182**Workbench Colors:** 183```json 184{ 185 "type": "light", 186 "name": "Aesthetic Computer Light", 187 "colors": { 188 "editor.background": "#fcf7c5", 189 "editor.foreground": "#281e5a", 190 "editorCursor.foreground": "#387adf", 191 "editor.lineHighlightBackground": "#ffcf6940", 192 "editor.selectionBackground": "#f6fdc380", 193 "activityBar.background": "#e8e3b0", 194 "sideBar.background": "#f5f0c0", 195 "statusBar.background": "#006400", 196 "titleBar.activeBackground": "#fcf7c5" 197 } 198} 199``` 200 201### Phase 5: Syntax Token Colors 202 203Translate KidLisp highlighting to TextMate scopes: 204 205```json 206{ 207 "tokenColors": [ 208 { 209 "scope": "comment", 210 "settings": { "foreground": "#808080" } 211 }, 212 { 213 "scope": "string", 214 "settings": { "foreground": "#ffff00" } 215 }, 216 { 217 "scope": "constant.numeric", 218 "settings": { "foreground": "#ffc0cb" } 219 }, 220 { 221 "scope": "keyword.control", 222 "settings": { "foreground": "#00ff00" } 223 }, 224 { 225 "scope": "entity.name.function", 226 "settings": { "foreground": "#00ffff" } 227 }, 228 { 229 "scope": "variable", 230 "settings": { "foreground": "#ffa500" } 231 }, 232 { 233 "scope": "support.function", 234 "settings": { "foreground": "#ff69b4" } 235 } 236 ] 237} 238``` 239 240--- 241 242## 🔧 Live Development Workflow 243 244### Method 1: Settings-Based Prototyping (Recommended) 245 2461. **Open VS Code settings** (`Cmd/Ctrl + ,`) 2472. **Add color customizations** for live preview: 248 ```json 249 { 250 "workbench.colorCustomizations": { 251 "editor.background": "#46326e", 252 "editor.foreground": "#ffffff99" 253 }, 254 "editor.tokenColorCustomizations": { 255 "comments": "#808080", 256 "strings": "#ffff00" 257 } 258 } 259 ``` 2603. **Changes apply instantly** - no reload needed! 2614. **Generate theme file** when satisfied: 262 - `Cmd/Ctrl + Shift + P` → "Developer: Generate Color Theme from Current Settings" 263 264### Method 2: Extension Development Host 265 2661. **Open extension folder** in VS Code 2672. **Press F5** to launch Extension Development Host 2683. **Edit theme JSON files** directly 2694. **Reload** (`Cmd/Ctrl + R` in dev host) to see changes 270 271### Method 3: Theme JSON Hot Reload 272 273With `-color-theme.json` suffix: 274- **Color decorators** show in the JSON 275- **Color pickers** for easy adjustment 276- **Hover documentation** for color keys 277 278### Method 4: Browser DevTools 279 280For testing specific colors: 2811. `Help > Toggle Developer Tools` 2822. Inspect VS Code elements 2833. Test CSS custom property values 284 285--- 286 287## 📦 Development Commands 288 289```bash 290cd vscode-extension 291 292# Install dependencies 293npm install 294 295# Compile extension 296npm run compile 297 298# Build VSIX package 299npm run build 300 301# Test in development host 302# Press F5 in VS Code with extension folder open 303 304# Reload extension after changes 305npm run reload 306 307# Publish to marketplace 308npm run publish 309``` 310 311--- 312 313## 🎨 Theme Color Reference 314 315### Full VS Code Theme Color List 316See: https://code.visualstudio.com/api/references/theme-color 317 318Key sections to customize: 319- **Editor** - Main editing area 320- **Sidebar** - File explorer, search 321- **Activity Bar** - Left icon bar 322- **Status Bar** - Bottom bar 323- **Terminal** - Integrated terminal 324- **Tabs** - Editor tabs 325- **Buttons** - UI buttons 326- **Input** - Text inputs 327- **Lists** - Dropdown lists 328- **Git** - Source control colors 329 330### TextMate Scopes for Syntax 331See: https://macromates.com/manual/en/language_grammars 332 333Common scopes: 334- `comment` - Code comments 335- `string` - String literals 336- `constant.numeric` - Numbers 337- `keyword` - Language keywords 338- `entity.name.function` - Function names 339- `variable` - Variables 340- `support.function` - Built-in functions 341- `punctuation` - Brackets, parens, etc. 342 343--- 344 345## 🚀 Release Checklist 346 347- [ ] Create `themes/` directory 348- [ ] Create `aesthetic-dark-color-theme.json` 349- [ ] Create `aesthetic-light-color-theme.json` 350- [ ] Update `package.json` with theme contributions 351- [ ] Test in Extension Development Host 352- [ ] Test both themes in various file types: 353 - [ ] JavaScript/TypeScript (.js, .ts, .mjs) 354 - [ ] KidLisp (.lisp) ✨ 355 - [ ] PeaceScript (.pjs) 356 - [ ] JSON 357 - [ ] Markdown 358- [ ] Update README with theme screenshots 359- [ ] Bump version in package.json 360- [ ] Build and publish: `npm run publish` 361 362--- 363 364## 💡 Advanced Ideas 365 366### Semantic Token Colors 367For enhanced JavaScript/TypeScript highlighting: 368```json 369{ 370 "semanticHighlighting": true, 371 "semanticTokenColors": { 372 "variable.readonly": "#00ffff", 373 "parameter": "#ffa500", 374 "function.declaration": "#ff69b4" 375 } 376} 377``` 378 379### KidLisp-Specific Theme Colors 380 381The themes should enhance KidLisp highlighting with these colors: 382 383```json 384{ 385 "tokenColors": [ 386 { 387 "scope": "comment.line.semicolon.kidlisp", 388 "settings": { "foreground": "#808080", "fontStyle": "italic" } 389 }, 390 { 391 "scope": "constant.numeric.timing.kidlisp", 392 "settings": { "foreground": "#ffff00" } 393 }, 394 { 395 "scope": "variable.other.embedded.kidlisp", 396 "settings": { "foreground": "#32cd32" } 397 }, 398 { 399 "scope": "entity.name.tag.painting.kidlisp", 400 "settings": { "foreground": "#ff8c00" } 401 }, 402 { 403 "scope": "support.constant.rainbow.kidlisp", 404 "settings": { "foreground": "#ff69b4", "fontStyle": "bold" } 405 }, 406 { 407 "scope": "entity.name.function.graphics.kidlisp", 408 "settings": { "foreground": "#00ffff" } 409 }, 410 { 411 "scope": "entity.name.function.control.kidlisp", 412 "settings": { "foreground": "#00ff00" } 413 }, 414 { 415 "scope": "entity.name.function.math.kidlisp", 416 "settings": { "foreground": "#ff69b4" } 417 }, 418 { 419 "scope": "variable.language.builtin.kidlisp", 420 "settings": { "foreground": "#87ceeb" } 421 }, 422 { 423 "scope": "support.constant.color.kidlisp", 424 "settings": { "foreground": "#ffa500" } 425 } 426 ] 427} 428``` 429 430### Icon Theme (Future) 431Consider creating matching file/folder icons: 432```json 433{ 434 "contributes": { 435 "iconThemes": [ 436 { 437 "id": "aesthetic-icons", 438 "label": "Aesthetic Computer Icons", 439 "path": "./icons/aesthetic-icon-theme.json" 440 } 441 ] 442 } 443} 444``` 445 446--- 447 448## 📚 Resources 449 450- [VS Code Color Theme Guide](https://code.visualstudio.com/api/extension-guides/color-theme) 451- [Theme Color Reference](https://code.visualstudio.com/api/references/theme-color) 452- [Syntax Highlighting Guide](https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide) 453- [TextMate Language Grammars](https://macromates.com/manual/en/language_grammars) 454- [Extension Publishing](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) 455 456--- 457 458## 🎯 Quick Start 459 460To start live-developing a theme RIGHT NOW: 461 4621. Add this to your VS Code settings (`settings.json`): 463```json 464{ 465 "workbench.colorCustomizations": { 466 "editor.background": "#46326e", 467 "editor.foreground": "#ffffffcc", 468 "editorCursor.foreground": "#c81e64", 469 "activityBar.background": "#2d1f47", 470 "sideBar.background": "#3a2959", 471 "statusBar.background": "#32cd32", 472 "terminal.background": "#46326e" 473 }, 474 "editor.tokenColorCustomizations": { 475 "comments": "#808080", 476 "strings": "#ffff00", 477 "numbers": "#ffc0cb", 478 "keywords": "#00ff00", 479 "functions": "#00ffff" 480 } 481} 482``` 483 4842. See changes instantly! 485 4863. When happy, run: `Developer: Generate Color Theme from Current Settings` 487 4884. Save the generated JSON to `vscode-extension/themes/` 489 490--- 491 492*Created: December 24, 2025* 493*For: Aesthetic Computer VS Code Extension*