M2.2: PHP highlighting, syntax colour tokens and editor.reveal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-10-17 12:06:42 +02:00
parent f13a49064d
commit 6c75c08d70
25 changed files with 1044 additions and 33 deletions

View file

@ -2,7 +2,7 @@
**Stage: pre-alpha (M1 done)** · next: M2 syntax and search; alpha when the six core workflows work end to end (see [docs/roadmap.md › Alpha gate](docs/roadmap.md#alpha-gate))
> **Last reviewed:** 2026-10-15 · **Last updated:** 2026-10-16 · **Change:** minor (M1.9b: settings dialog; M1 done) · **Target:** JetBrains PhpStorm 2026.x, described from public documentation only
> **Last reviewed:** 2026-10-15 · **Last updated:** 2026-10-16 · **Change:** minor (M2.2: syntax highlighting, `editor.reveal`) · **Target:** JetBrains PhpStorm 2026.x, described from public documentation only
Lutra is a clean-room, open-source PHP IDE with a Rust core and a Tauri + Vue interface, targeting the PhpStorm workflow. Agents can drive all of it over MCP, the `lutra` CLI and a JSON control channel. This page is the summary; the evidence is in [`docs/target-app-parity.md`](docs/target-app-parity.md) and the work list in [`docs/gaps.md`](docs/gaps.md).
@ -13,7 +13,7 @@ Lutra is a clean-room, open-source PHP IDE with a Rust core and a Tauri + Vue in
| | Value | Kind |
|---|---|---|
| **Feature breadth** (PhpStorm's actions, tool windows, languages, integrations exist) | **<1%** (project tool window, editor tabs; no inventory to count against yet) | estimated |
| **Feature depth** (weighted by use, scored by behaviour) | **~1.6%** (Editor core 9% × weight 12, Project view 8% × weight 6, Settings 7% × weight 1, of 101) | estimated |
| **Feature depth** (weighted by use, scored by behaviour) | **~1.7%** (Editor core 10% × weight 12, Project view 8% × weight 6, Settings 7% × weight 1, of 101) | estimated |
| **To MVP (M3)** | **~13 h left** (M1 done in ~5.6 h measured: C1 2.5 h, C2 3.1 h; M2 ~5 h, M3 ~8 h); was ~190 h before calibration | estimated (×0.1; C1 factor 0.07, C2 factor 0.10) |
| **To full parity** | **~330 h** if the speed of cycles C1 and C2 holds (range 300–3,300 h; deep areas such as type inference and inspections have no data yet) | estimated |
@ -41,7 +41,7 @@ Stability 8%: no-panic lints, the engine guard, a fuzzed control protocol and a
| Area | % | One agent (h) |
|---|---:|---:|
| Editor core (buffers, undo, multi-caret, folding, soft wrap) | 9% (est.) | ~106 |
| Editor core (buffers, undo, multi-caret, folding, soft wrap) | 10% (est.) | ~104 |
| Project view, VFS, file watching | 8% (est.) | ~40 |
| Navigation (go to class/file/symbol, recent files, structure) | 0% | ~120 |
| Search and replace (in file, in project, structural) | 0% | ~80 |
@ -76,6 +76,7 @@ All hours estimated. Weights, evidence and the missing items per area: [target-a
| Date | What landed |
|---|---|
| 2026-10-16 | M2.2: PHP files are highlighted (with the HTML around `<?php` blocks), and so are HTML, CSS, JS/TS, JSON, YAML and Markdown, in Lutra's own colours for both themes, each readable at 4.5:1 or better; `editor.reveal` jumps to a file position for the coming Find, Go-to and Structure windows and for agents. |
| 2026-10-16 | M1.9b, M1 done: a settings dialog (`Mod+,`) built from the engine's settings, with search, a control per type, reset to default and inline errors; changes apply at once and follow edits from agents live; the theme picker switches at once and the editor font size applies to the editor. |
| 2026-10-16 | M1.8: a command palette (`Mod+Shift+P`) finds every command by fuzzy match, recent ones first, with shortcuts shown and unavailable ones dimmed; one global keymap serves engine and UI commands (`Mod+1` toggles the project tree); agents can trigger UI commands over the control channel. |
| 2026-10-16 | M1.12: errors and notices reach the user as toasts instead of stderr: a corrupt settings file or recovery entry, a folder that cannot be opened (also with unsaved changes when switching projects), stopped file watching and failed commands without their own UI. Info toasts go away after 5 s, warnings and errors stay. |
@ -91,6 +92,7 @@ All hours estimated. Weights, evidence and the missing items per area: [target-a
| Date | Change | Summary |
|---|---|---|
| 2026-10-16 | minor | M2.2: Editor core 10%, feature depth ~1.7% |
| 2026-10-16 | minor | Cycle C2 review: M1 measured at ~5.6 h, C2 factor 0.10 confirms ×0.1 |
| 2026-10-16 | minor | M1.9b: M1 done, stage line, Settings row 7% (est.), progress log |
| 2026-10-16 | minor | M1.8: progress log, agent automation note (scores unchanged) |