summaryrefslogtreecommitdiff
path: root/docs/typ/guide.typ
diff options
context:
space:
mode:
Diffstat (limited to 'docs/typ/guide.typ')
-rw-r--r--docs/typ/guide.typ33
1 files changed, 31 insertions, 2 deletions
diff --git a/docs/typ/guide.typ b/docs/typ/guide.typ
index 55f8a4f0..7058592f 100644
--- a/docs/typ/guide.typ
+++ b/docs/typ/guide.typ
@@ -218,10 +218,39 @@ around it, a `+`/`-` before each line, the words a changed line changed
tinted and a line added or removed whole faintly. A mailed patch keeps its
message and diffstat above. The files are found from the diff's directory
or one above it. #word("Diff") on a `+Diff` shows the diff itself as
-text (a paged one's `+Pager` is folded under it), and on the text stacks
+text (a paged one's `+Pager` is closed once stacked), and on the text stacks
it again; #word("DiffLook") `text` in the startup file opens the text
first.
+= Call hierarchy <callstack>
+
+Put the cursor on a function and run #word("Callstack") (#key("g c") or #key("SPC l b")).
+`+Callstack` starts at the outermost callers and follows calls down toward
+the selected function, with shared callers grouped and vertical guides
+joining the levels with rounded corners. Each caller has a clickable location and its function
+signature, extracted by the same tree-sitter context mechanism as other
+location results. Signatures and call-site snippets use source syntax colors;
+only calls to the selected function receive background emphasis. Guides
+continue alongside every line of a multiline signature and through screen
+wrapping. Cross-directory Look paths are shortened when possible.
+#btn("B3") or #key("Enter") on a location opens and reveals that source
+pane. #word("LookNext") / #word("LookPrev") (#keys("SPC j n", "SPC j p"))
+select locations without opening them. The view follows the language
+server's static call hierarchy; recursive paths are marked `↻`, and a
+large hierarchy invites continuing from another function.
+#word("CallstackDepth") reports the current caller depth;
+`CallstackDepth 16` changes it for subsequent queries. The default is 8
+levels, and the accepted range is 1–64. The view also caps collection at
+64 callers.
+
+`CallstackLayout stacked` (the default) puts each signature and call snippet below its
+location, aligned with the location text; `CallstackLayout inline` puts it
+beside the location again. A bare #word("CallstackLayout") switches modes.
+`CallstackCorners rounded` (the default) uses rounded tree guides;
+`CallstackCorners square` restores sharp corners. Bare #word("CallstackCorners")
+switches styles. Layout and corner changes apply to the next query. These settings are retained
+by #word("Dump") / #word("Restore").
+
= `pardes FILE` and `--wait` <editor>
In a pane's shell:
@@ -242,7 +271,7 @@ refusals and `--nested` are in the reference.
[#key("x"), #key("v"), #key(";")], [select the line; extend; collapse to the cursor],
[#key("s")], [a cursor per regex match; every edit acts at each],
[#key("/"), #keys("n", "N")], [substring search; repeat the search in the current text, wrapping at the ends],
- [#keys("Space j n", "Space j p")], [#word("LookNext") / #word("LookPrev"): select locations across panes; #key("Enter") opens one],
+ [#keys("SPC j n", "SPC j p")], [#word("LookNext") / #word("LookPrev"): select locations across panes; #key("Enter") opens one],
[#key("g l")], [line end],
[`12G`], [line 12; a bare #key("G") does nothing],
[#key("SPC ?")], [#word("Help"): every builtin, with its leader path and keys; `SPC w ?` only the paths under `SPC w`; #word("Tutor") (#key("SPC h t")) practises them],