diff options
| author | Gabriel Schneider <[email protected]> | 2026-07-28 23:30:29 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-01 15:02:07 -0300 |
| commit | f43c1e11b44e2464f0bb0b635e0abcaf3c717e23 (patch) | |
| tree | ddc5e5528ebb59f72d30bef49522f814578e4fce /test/snapshots | |
| parent | 65b207c3392c75eac3f2b18a266a6482d8345df1 (diff) | |
| download | pardes-f43c1e11b44e2464f0bb0b635e0abcaf3c717e23.tar.gz pardes-f43c1e11b44e2464f0bb0b635e0abcaf3c717e23.zip | |
LSP seam: async execution model, helix keymap, evaluation harness
The base every language backend plugs into. Three parts:
ASYNC. The core had no request/response shape - every effect was
fire-and-forget or instantaneous. A language query is the first thing
that answers later, so: Effect .lsp -> shell worker -> Event .lsp_resp.
tty.zig uses io.concurrent + the vaxis queue, gui.zig a detached thread
+ the mutex queue it already had for ptys; web no-ops it. The worker
never touches the core (path/source/arg are snapshotted into an LspJob),
one query in flight identified by a monotonic id so a second press makes
the first answer stale, and no rows is a legal answer.
KEYMAP. Helix's, verified against its default.rs rather than recalled.
gd/gD/gy/gi/gr and ]d/[d had no conflicts. The SPC letters did, so
pardes's own builtins moved instead of helix's: Kill k->q, Del d->wc
(closing a pane is a window op, and c is helix's own close), Dump/Restore
s?->f?, Tutor ht->T. A three-exception muscle-memory map is not a map.
RESULTS ARE +SEARCH ROWS. path:LINE:COL text, absolute. That is what
look.zig resolves and n/N step, so one row from a goto jumps and several
open a buffer - helix's multi-result picker needed no picker code.
Backends supply exactly one function (lsp.query) plus a supports set and
a name; the base has none on purpose. zig build lspbench scores them on
the same corpus: feature matrix (trusting results, not the supports
flag - a claimed-but-empty kind is reported as a false claim), cold and
warm latency, peak RSS.
Two snapshot scripts moved. leader.snap encoded the old key paths.
chordcut.snap's last two steps clicked column 5, which lands on a FILE
pane, so 'key c-b' toggled nothing and the typed text was being read as
normal-mode keys - the golden recorded no TTY pane and no cat -v output
anywhere. Pointing them at an actual shell makes both steps assert what
their comments claim, and the tty paste chord is now covered for the
first time.
Diffstat (limited to 'test/snapshots')
| -rw-r--r-- | test/snapshots/chordcut.golden | 56 | ||||
| -rw-r--r-- | test/snapshots/chordcut.snap | 20 | ||||
| -rw-r--r-- | test/snapshots/leader.golden | 116 | ||||
| -rw-r--r-- | test/snapshots/leader.snap | 38 |
4 files changed, 118 insertions, 112 deletions
diff --git a/test/snapshots/chordcut.golden b/test/snapshots/chordcut.golden index be00dc57..6f2da745 100644 --- a/test/snapshots/chordcut.golden +++ b/test/snapshots/chordcut.golden @@ -339,21 +339,21 @@ |27: 0-1 d,#444444, 2-6 #626262,#080808, 7-29 d,#080808, 30-31 d,#444444, 32-59 #bdbdbd,#080808, 60-61 d,#444444, 62-89 #bdbdbd,#080808, |28: 0-1 d,#444444, 2-6 #626262,#080808, 7-29 d,#080808, 30-31 d,#444444, 32-59 #bdbdbd,#080808, 60-61 d,#444444, 62-89 #bdbdbd,#080808, |29: 0-1 d,#444444, 2-6 #626262,#080808, 7-29 d,#080808, 30-31 d,#444444, 32-59 #bdbdbd,#080808, 60-61 d,#444444, 62-89 #bdbdbd,#080808, -== snap ttyprobe grid=90x30 cursor=9,11 +== snap ttyprobe grid=90x30 cursor=44,13 |Kill Newcol Tutor Debug NextColor Dump Find Grep -| NOR /tmp/pardes-snap/chordcu NOR /tmp/pardes-snap/chordcu NOR /tmp/pardes-snap/chordcu -| 1 line 1 +| NOR /tmp/pardes-snap/chordcu TTY /tmp/pardes-snap/chordcu NOR /tmp/pardes-snap/chordcu +| 1 line 1 $ ls | 2 2echo B''OO g.txt f.txt g.txt f.txt g.txt -| 3 line 3 -| 4 line 4line -| 5 lline 5 -| 6 canon -echo; printf '\x f.txt -| 7 BOO -| -| -| -| -| +| 3 line 3 $ +| 4 line 4line $ +| 5 lline 5 $ +| 6 $ echo B''OO +| BOO +| $ stty -icanon -echo; printf +| '\x1b[?2004h\x1b[?1000h\x1b +| [?1006h'; cat -v +| ^[[<0;8;10M^[[<0;8;10m^[[200 +| ~line^[[201~ | | | NOR /tmp/pardes-snap/chordcu NOR /tmp/pardes-snap/chordcu @@ -370,23 +370,23 @@ | | | -== snap ttyprompt grid=90x30 cursor=9,11 +== snap ttyprompt grid=90x30 cursor=38,15 |Kill Newcol Tutor Debug NextColor Dump Find Grep -| NOR /tmp/pardes-snap/chordcu NOR /tmp/pardes-snap/chordcu NOR /tmp/pardes-snap/chordcu -| 1 line 1 +| NOR /tmp/pardes-snap/chordcu TTY /tmp/pardes-snap/chordcu NOR /tmp/pardes-snap/chordcu +| 1 line 1 $ ls | 2 2echo B''OO g.txt f.txt g.txt f.txt g.txt -| 3 line 3 -| 4 line 4line -| 5 lline 5 -| 6 canon -echo; printf '\x f.txt -| 7 BOO -| -| -| -| -| -| -| +| 3 line 3 $ +| 4 line 4line $ +| 5 lline 5 $ +| 6 $ echo B''OO +| BOO +| $ stty -icanon -echo; printf +| '\x1b[?2004h\x1b[?1000h\x1b +| [?1006h'; cat -v +| ^[[<0;8;10M^[[<0;8;10m^[[200 +| ~line^[[201~ +| $ +| $ line | NOR /tmp/pardes-snap/chordcu NOR /tmp/pardes-snap/chordcu | 1 line 1 | 2 line 2 f.txt g.txt diff --git a/test/snapshots/chordcut.snap b/test/snapshots/chordcut.snap index a412b57e..a1b65a4d 100644 --- a/test/snapshots/chordcut.snap +++ b/test/snapshots/chordcut.snap @@ -118,18 +118,18 @@ snapstyle clickdismiss # tty paste chord: a mouse-listening app gets the click forwarded (SGR, # body-relative) then the register between bracketed-paste markers — # cat -v prints the received bytes visibly -press left 5 11 -release left 5 11 +press left 35 11 +release left 35 11 stable 400 5000 key c-b stable 600 8000 text stty -icanon -echo; printf '\x1b[?2004h\x1b[?1000h\x1b[?1006h'; cat -v key enter stable 700 8000 -press left 10 12 -press right 10 12 -release right 10 12 -release left 10 12 +press left 40 12 +press right 40 12 +release right 40 12 +release left 40 12 stable 700 8000 snap ttyprobe # a plain prompt (mouse modes off) gets no click bytes — just the paste; @@ -139,9 +139,9 @@ stable 600 8000 text stty sane; printf '\x1b[?1000l\x1b[?1006l' key enter stable 600 8000 -press left 10 12 -press right 10 12 -release right 10 12 -release left 10 12 +press left 40 12 +press right 40 12 +release right 40 12 +release left 40 12 stable 700 8000 snap ttyprompt diff --git a/test/snapshots/leader.golden b/test/snapshots/leader.golden index 934573be..5215b6ae 100644 --- a/test/snapshots/leader.golden +++ b/test/snapshots/leader.golden @@ -39,9 +39,9 @@ | | | -== snap spc-h grid=100x40 cursor=7,2 +== snap spc-f grid=100x40 cursor=7,2 |Kill Newcol Tutor Debug NextColor Dump Find Grep -| NOR /tmp/pardes-snap/leader/cwd/cmds.txt S SPC h NOR /tmp/pardes-snap/leader/cwd Del +| NOR /tmp/pardes-snap/leader/cwd/cmds.txt S SPC f NOR /tmp/pardes-snap/leader/cwd Del | 1 Help | cmds.txt | @@ -189,20 +189,20 @@ | 2 or execute the name anywhere | 3 | 4 SPC ? Help -| 5 SPC c d Delcol -| 6 SPC c n Newcol -| 7 SPC d Del -| 8 SPC f f Find -| 9 SPC f g Grep -| 10 SPC f s Save -| 11 SPC h t Tutor -| 12 SPC k Kill -| 13 SPC s d Dump -| 14 SPC s r Restore -| 15 SPC t a Ascii -| 16 SPC t c Colors -| 17 SPC t d Debug -| 18 SPC t l Palette +| 5 SPC D WsDiagnostics +| 6 SPC S WsSymbols +| 7 SPC T Tutor +| 8 SPC a CodeAction +| 9 SPC c d Delcol +| 10 SPC c n Newcol +| 11 SPC d Diagnostics +| 12 SPC f d Dump +| 13 SPC f f Find +| 14 SPC f g Grep +| 15 SPC f r Restore +| 16 SPC f s Save +| 17 SPC h SelectRefs +| 18 SPC k Hover == snap help-group grid=100x40 cursor=7,22 |Kill Newcol Tutor Debug NextColor Dump Find Grep | NOR /tmp/pardes-snap/leader/cwd/cmds.txt Save De NOR /tmp/pardes-snap/leader/cwd Del @@ -226,14 +226,14 @@ | | | NOR /tmp/pardes-snap/leader/cwd/+Help Del -| 1 pardes builtins under SPC h +| 1 pardes builtins under SPC f | 2 -| 3 SPC h t Tutor -| 4 -| -| -| -| +| 3 SPC f d Dump +| 4 SPC f f Find +| 5 SPC f g Grep +| 6 SPC f r Restore +| 7 SPC f s Save +| 8 | | | @@ -267,14 +267,14 @@ | 8 | 9 | NOR /tmp/pardes-snap/leader/cwd/+Help Del -| 1 pardes builtins under SPC h +| 1 pardes builtins under SPC f | 2 -| 3 SPC h t Tutor -| 4 -| -| -| -| +| 3 SPC f d Dump +| 4 SPC f f Find +| 5 SPC f g Grep +| 6 SPC f r Restore +| 7 SPC f s Save +| 8 | | | @@ -308,14 +308,14 @@ | | | NOR /tmp/pardes-snap/leader/cwd/+Help Del -| 1 pardes builtins under SPC h +| 1 pardes builtins under SPC f | 2 -| 3 SPC h t Tutor -| 4 -| -| -| -| +| 3 SPC f d Dump +| 4 SPC f f Find +| 5 SPC f g Grep +| 6 SPC f r Restore +| 7 SPC f s Save +| 8 | | | @@ -353,20 +353,20 @@ | 2 or execute the name anywhere | 3 | 4 SPC ? Help -| 5 SPC c d Delcol -| 6 SPC c n Newcol -| 7 SPC d Del -| 8 SPC f f Find -| 9 SPC f g Grep -| 10 SPC f s Save -| 11 SPC h t Tutor -| 12 SPC k Kill -| 13 SPC s d Dump -| 14 SPC s r Restore -| 15 SPC t a Ascii -| 16 SPC t c Colors -| 17 SPC t d Debug -| 18 SPC t l Palette +| 5 SPC D WsDiagnostics +| 6 SPC S WsSymbols +| 7 SPC T Tutor +| 8 SPC a CodeAction +| 9 SPC c d Delcol +| 10 SPC c n Newcol +| 11 SPC d Diagnostics +| 12 SPC f d Dump +| 13 SPC f f Find +| 14 SPC f g Grep +| 15 SPC f r Restore +| 16 SPC f s Save +| 17 SPC h SelectRefs +| 18 SPC k Hover == snap help-toggles grid=100x40 cursor=7,22 |Kill Newcol Tutor Debug NextColor Dump Find Grep | NOR /tmp/pardes-snap/leader/cwd/cmds.txt Save De NOR /tmp/pardes-snap/leader/cwd Del @@ -433,13 +433,13 @@ | NOR /tmp/pardes-snap/leader/cwd/+Help Del | 1 pardes builtins under SPC w | 2 -| 3 SPC w h Left -| 4 SPC w j Down -| 5 SPC w k Up -| 6 SPC w l Right -| 7 SPC w t Toggleterm -| 8 -| +| 3 SPC w c Del +| 4 SPC w h Left +| 5 SPC w j Down +| 6 SPC w k Up +| 7 SPC w l Right +| 8 SPC w t Toggleterm +| 9 | | | diff --git a/test/snapshots/leader.snap b/test/snapshots/leader.snap index c8e13b8e..e06d5a3c 100644 --- a/test/snapshots/leader.snap +++ b/test/snapshots/leader.snap @@ -6,6 +6,10 @@ # pane with no file behind it, like +Search). The paths, the Help lines and # the execute dispatch are all folded out of ONE enum at comptime — so # executing the WORD `Help` runs the same builtin the leader does. +# +# The single-letter slots k/r/a/h/s/S/d/D belong to helix's LSP commands, so +# pardes's own builtins live around them: Kill on `q`, Del in the window group +# as `w c`, Dump/Restore in the file group, Tutor on `T`. file cmds.txt Help start 40 100 cmds.txt wait 8000 Kill Newcol @@ -15,10 +19,10 @@ stable 700 20000 key space stable 400 5000 snap spc -# ... and grows as the path is typed (`h` = the docs group) -key h +# ... and grows as the path is typed (`f` = the file group) +key f stable 400 5000 -snap spc-h +snap spc-f # Esc abandons the sequence: indicator gone, nothing ran, cursor untouched key esc settle 100 @@ -27,41 +31,43 @@ snap abandoned # an UNMAPPED key abandons too, rather than waiting: a typo must not leave the # next keystroke armed at a builtin that closes panes key space -key q +key z stable 400 5000 snap unmapped # executing the WORD `Help` (middle-click) runs the builtin — the enum IS the # lookup, so a name works anywhere text lives. Every builtin, with its keys. press middle 9 3 release middle 9 3 -wait 10000 SPC h t +wait 10000 SPC T stable 700 15000 snap help-word -# `SPC h ?`: only the `h` group, rewritten into the SAME +Help buffer +# `SPC f ?`: only the `f` group, rewritten into the SAME +Help buffer key space -key h +key f key ? -wait 10000 under SPC h +wait 10000 under SPC f stable 700 15000 snap help-group -# `SPC h t`: the Tutor builtin, zero arguments. It runs from the +Help pane, +# `SPC T`: the Tutor builtin, zero arguments. It runs from the +Help pane, # but that is an output pane and not a document — so the tutor lands under # cmds.txt, the real doc, with the listing left at the foot of the column. key space -key h -key t +key T wait 10000 PARDES TUTOR stable 700 15000 snap tutor -# `SPC d`: Del is pane-scoped — it closes the tutor, focus falls back +# `SPC w c`: Del is pane-scoped — it closes the tutor, focus falls back. It +# sits in the window group because closing a pane IS a window operation, and +# because `d` now belongs to the diagnostics picker. key space -key d +key w +key c stable 700 15000 snap deleted # `SPC ?` at the root lists everything again key space key ? -wait 10000 SPC s r +wait 10000 SPC f r stable 700 15000 snap help-all # `SPC t ?`: the toggle group, seven of them now that the image renderer @@ -73,8 +79,8 @@ key ? wait 10000 Petscii stable 700 15000 snap help-toggles -# `SPC w ?`: the window group, whose five builtins are the tail of the full -# listing above and fall off the bottom of this pane there +# `SPC w ?`: the window group — the four focus moves, the terminal hop, and +# Del. They are the tail of the full listing above and fall off its bottom. key space key w key ? |
