summaryrefslogtreecommitdiff
path: root/test/snapshots/lsprelpath.snap
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-25 11:40:05 -0300
committerGabriel Schneider <[email protected]>2026-10-25 12:24:05 -0300
commit685b4050bb0caaa95c4c6a209e69f7777469e9fc (patch)
treeb1c34301f9f1febd5e70dfdfee52425cdca0ef4a /test/snapshots/lsprelpath.snap
parent29d753b420385d7ca214250909e3a33c85cfab8d (diff)
downloadpardes-685b4050bb0caaa95c4c6a209e69f7777469e9fc.tar.gz
pardes-685b4050bb0caaa95c4c6a209e69f7777469e9fc.zip
query: a row is its place as text, `path:line:col` then its code, the path the shortest a Look from the query pane resolves (Query.lookPath: relative, `../` included, when shorter, else absolute, never `@pN` but for a text with no file), aligned per group, the declaration headers `path:line`; its code coloured as its file's language colours it, the file painted whole on the worker (Stream.paintRows, highlightApart, kept in the locations cache, Query.Shades a walk a refill, Query.recolor in place as each lands) with the match tinted over it; the +Preview's places are the query's hits in its file (a Grep searched, a list fed), tinted and ticked, the row's one current and selected, as in a pane that already shows it; tests for B3 on an address, a saved list's Looks, the shortest path, the preview's places and colours, the worker's colours; fsearch, grep, lookrange, lsp-client, lsprelpath (now `../shade.zig`), stepgrain, tagbottom goldens: the address rows; docs/next-searchrows.md: the design and the numbers
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016u3hBPFfja5pK4EBRC1UVD
Diffstat (limited to 'test/snapshots/lsprelpath.snap')
-rw-r--r--test/snapshots/lsprelpath.snap23
1 files changed, 11 insertions, 12 deletions
diff --git a/test/snapshots/lsprelpath.snap b/test/snapshots/lsprelpath.snap
index 70ca3fdc..152a13a3 100644
--- a/test/snapshots/lsprelpath.snap
+++ b/test/snapshots/lsprelpath.snap
@@ -1,19 +1,18 @@
# What a language row SPELLS its path as, and that both spellings still LOOK.
#
-# A row is written relative to the directory of the file the query was asked
-# about (lsp.rel, fed from Req.root) when the answer lives UNDER that directory,
-# and keeps its full absolute path when it does not — a `gr` list was otherwise
+# A row spells its path the shortest way a Look from the query pane resolves
+# (Query.lookPath): relative to the pane's directory, `../` included, when that
+# is shorter than the absolute path, else absolute — a `gr` list was otherwise
# the same forty-character prefix repeated down the pane with the part you came
-# to read pushed off the right edge, and a path outside the tree has nothing
-# short to be called.
+# to read pushed off the right edge.
#
# A row in the SAME directory shortens to a bare basename; the two that a
-# prefix strip can actually get wrong are here, one app each, as `gr` rows
+# careless shortening can get wrong are here, one app each, as `gr` rows
# (the file headers of the asking text's query pane, line 1 `Refs`):
#
-# PARENT the enum is one level UP from the asking file, so nothing is
-# stripped and the row carries `/tmp/.../cwd/shade.zig`. This is
-# the case that must NOT become `../shade.zig`.
+# PARENT the enum is one level UP from the asking file, so the row
+# climbs: `../shade.zig`, shorter than `/tmp/.../cwd/shade.zig`,
+# and a Look from the pane still lands on it.
# SUBDIRECTORY the enum is one level DOWN, so the strip leaves a path with a
# separator still in it — `inner/tint.zig`, not `tint.zig`. A
# strip that took the basename instead would produce a row that
@@ -29,7 +28,7 @@ file shade.zig pub const Shade = enum {\n verdigris,\n cinnabar,\n};\n
file sub/inner/tint.zig pub const Tint = enum {\n ochre,\n indigo,\n};\n
file sub/parent.zig const shade = @import("../shade.zig");\n\npub fn pick(s: shade.Shade) u8 {\n return switch (s) {\n \n };\n}\n
file sub/subdir.zig const tint = @import("inner/tint.zig");\n\npub fn hue(t: tint.Tint) u8 {\n return switch (t) {\n \n };\n}\n
-# ---- PARENT: outside the asking file's tree, so the row stays absolute ----
+# ---- PARENT: outside the asking file's tree, so the row climbs ----
start 35 100 sub/parent.zig
wait 8000 fn pick
stable 700 20000
@@ -39,8 +38,8 @@ stable 400 5000
key g
key r
# the query pane under parent.zig, line 1 `Refs`, the rows under each file:
-# shade.zig's spelled whole, its directory being above
-wait 15000 cwd/shade.zig
+# shade.zig's spelled from above, `../shade.zig`
+wait 15000 ../shade.zig:1
stable 700 15000
snap absrow
# the current row is parent.zig's own; the one before it is shade.zig's,