feat(editor): hint the matching snippet in the panel on typing pause

Snapshot the snippet name inline Tab would expand into a panel field in
refresh_stats, so it rides the typing-pause throttle rather than
repainting per keystroke. Draw it as `» name` on the row above the mode
line (Latin-9 has no tab glyph), sharing the slot with the NO KBD flag,
which can't co-occur since the hint means you're typing.
This commit is contained in:
Julien Calixte
2026-07-12 10:09:43 +02:00
parent 4aaf89d977
commit baf9715570
3 changed files with 108 additions and 12 deletions

View File

@@ -34,11 +34,15 @@ behaviour.
handler alongside the existing `list_marker` transform
(`expand_snippet(word) -> Option<Snippet>`). Tab already arrives as
`Key::Char('\t')`, so no new key event.
- [ ] **Hint-on-pause.** On the typing pause (same throttle as the word-count /
- [x] **Hint-on-pause.** On the typing pause (same throttle as the word-count /
cursor refresh — never a per-keystroke repaint), if the word before the
caret is a prefix, the right side panel shows a quiet hint. The panel is
~17 cols, so the hint is the snippet **name / first line**, not the whole
body — the full preview is the `$` palette's job.
caret is a prefix, the right side panel shows a quiet hint (`» name`, on the
row above the mode line, sharing the slot with the `NO KBD` flag — the two
never co-occur since the hint means you're typing). The panel is ~15 cols,
so the hint is the snippet **name**, not the whole body — the full preview is
the `$` palette's job. Snapshotted in `refresh_stats` so it rides the pause,
and the firmware's Insert-pause repaint already carries it (no firmware
change). Latin-9 has no `↹` glyph, hence the `»` marker.
- [x] **`$` palette (browse + insert).** `Cmd-P` then `$` switches the palette to
the snippet list (the same sigil mechanism as `>`). Fuzzy-matches name /
prefix / description; Enter inserts the body at the caret and starts the