diff options
| author | Gabriel Schneider <[email protected]> | 2026-07-31 11:42:18 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-01 15:02:08 -0300 |
| commit | 911215846f1d5a9b2e37a00e74fb9266d4a0884a (patch) | |
| tree | 31413ca3336cbbd1933d9dc3e24f09a3b8ef46b4 /docs | |
| parent | 0b7a480bef38b209741c520e2478d178767a9e51 (diff) | |
| download | pardes-911215846f1d5a9b2e37a00e74fb9266d4a0884a.tar.gz pardes-911215846f1d5a9b2e37a00e74fb9266d4a0884a.zip | |
a Look path can name a range, and search selects what it found
file:LINE:COL-ENDLINE:ENDCOL, with the two short forms people actually type
reading naturally: file:412:9-21 on one line, file:412-418 whole ones. Ends are
inclusive. A path feature, not a search feature — a ranged path typed in a tag
or middle-clicked out of a shell's output selects just the same; search is only
its first consumer.
The dash is the fussy part. `-` was already a file char, so a ranged word
survives click expansion whole, but a range needs a number on BOTH sides or
my-file:10, build-2 and 2026-07-30 would stop being paths. Table-driven test in
look.zig for exactly that.
Selecting goes through the cellRange/setPaneRange pair the multi-cursor work
left, and hxOff clamps both ends, so a stale range selects what still exists
rather than crashing or reaching past EOF — pinned with an 8:6-400:9 range in a
nine-line file.
Producers: / search, Grep, and five LSP sites through a new spanRow — goto,
references, rename tokens and both symbol lists were throwing away real
protocol ranges at path:line:col. Left alone deliberately: Find rows are bare
paths with nothing to span, a jump is a spot not a span, and the diagnostic and
format paths only ever have a point, where half a range would be worse than
none.
One knock-on worth knowing: n now leaves an EXPLICIT selection, so a topbar
execute chords it. grep.snap's no-match step was silently becoming
`Grep TARGET`; it runs from the leader path now, which never chords, and the
dedicated chord steps stayed where they were.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/lsp.md | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/docs/lsp.md b/docs/lsp.md index a22a4c52..c89c42f7 100644 --- a/docs/lsp.md +++ b/docs/lsp.md @@ -51,11 +51,16 @@ Three rules make it safe: Every backend renders into one format: ``` -/abs/path/to/file.zig:LINE:COL text +/abs/path/to/file.zig:LINE:COL text +/abs/path/to/file.zig:LINE:COL-ENDCOL text ``` -1-based line and column, absolute path. This is the format `look.zig` already -resolves, `runSearch` already produces and `n`/`N` already step — so: +1-based line and column, absolute path. The second form carries the answer's +RANGE where the protocol gave one on a single line (a token, a symbol's name), +and a look on it SELECTS that span rather than parking at its first cell — so +`gd` lands on the whole name and `gr` steps references with each one +highlighted. This is the format `look.zig` already resolves, `runSearch` +already produces and `n`/`N` already step — so: - **one row from a goto** → jump straight there (`lookAt`) - **several rows** → an output buffer, which `n`/`N` walk |
