feat(editor): add snippet library, tab-stop engine, and $ palette

Parse the Zed-compatible .typoena.snippets.json (serde_json), strip
${n:label} stops to bare $n, and drive a forward-only tab-stop session.
Expand a prefix inline on Tab in Insert; browse and insert from the
Cmd-P palette via a $ sigil (parallel to the > command mode), landing
on $1 as one undo group.
This commit is contained in:
Julien Calixte
2026-07-12 10:03:45 +02:00
parent 221135cd9b
commit 4aaf89d977
2 changed files with 649 additions and 17 deletions

View File

@@ -8,3 +8,8 @@ description = "Modal (vim-style) text-editor core: the buffer, motions, edits, a
embedded-graphics = "0.8"
display = { path = "../display" }
keymap = { path = "../keymap" }
# Snippet library parse (v0.6): the `.typoena.snippets.json` file uses Zed's JSON
# shape. serde_json handles the string-escape corner cases a hand-rolled reader
# would get wrong; the crate is `std` (esp-idf provides std on xtensa).
serde = { version = "1", features = ["derive"] }
serde_json = "1"