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.typ53
1 files changed, 47 insertions, 6 deletions
diff --git a/docs/typ/guide.typ b/docs/typ/guide.typ
index 578e7ea8..a5327a44 100644
--- a/docs/typ/guide.typ
+++ b/docs/typ/guide.typ
@@ -42,7 +42,7 @@ steps raw, normal, insert.
#pairs(
[#mode-box(" ") normal], [#key("Esc"): back to the previous pane (#word("Last")), unlike helix. #key("Shift-Esc"): the same.],
[#mode-box("^") insert], [#key("Esc"): back to normal. #key("Shift-Esc"): out of insert and back to the previous pane.],
- [#mode-box("$") raw], [#key("Esc"): to the program, except at a shell prompt with nothing typed on it, where it goes back to the previous pane. #key("Shift-Esc"): always back. Either way the terminal stays raw.],
+ [#mode-box("$") raw], [#key("Esc"): back to the previous pane. #key("Shift-Esc"): an Esc to the program. Either way the terminal stays raw. #word("ProgramEsc") `on` swaps them back: #key("Esc") goes to the program, except at a shell prompt with nothing typed on it, and #key("Shift-Esc") always goes back.],
[a PDF], [#key("Esc"): clears the selection and the search highlights. #key("Shift-Esc"): back to the previous pane.],
)
@@ -54,7 +54,7 @@ it is a plain Esc. The previous pane is the last one you jumped from, else
the next pane down the column.
#pairs(
- [#key("Ctrl-w") #key("h")], [the keyboard to the pane on the left; #key("j") below, #key("k") above, #key("l") right],
+ [#key("Ctrl-w") or #key("SPC w")], [window mode (#word("Window")): each pane's tag box shows a letter instead of its mode, and the focused pane's tag is outlined; #keys("h", "j", "k", "l") move the outline, #key("Enter") or #key("Esc") gives that pane the keyboard, #key(":") its tag, a pane's letter gives it that one. #key("k") past a column's top pane goes on to its tag],
[#keys("Ctrl-o", "Ctrl-i")], [back and forward through the places you jumped to (the jump list), this file's first: another file's only once it has none left that way (#word("JumpScope") `all`: every place in order). #key("Ctrl-i") needs the kitty keyboard protocol or the GUI, being #key("Tab") elsewhere: there use #key("SPC j i") and #key("SPC j o"), or the mouse's side buttons],
)
@@ -167,7 +167,7 @@ the #word("Look") came from, then of each pane on the jump list, most
recent first.
#pairs(
- [#key("/") `TODO` #key("Enter")], [a `+Search` of the lines holding `TODO`; #key("n") moves the keyboard into it and walks its rows (#key("N") back), and #key("Enter") on a row takes the searched pane there],
+ [#key("/") `TODO` #key("Enter")], [a `+Search` of the lines holding `TODO`, the cursor on the first; #keys("n", "N") select the next or previous match],
[#word("Find") `conf`], [a `+Search` of the files below the pane's directory with `conf` in their names],
[#word("Grep") `TODO`], [a `+Search` of the lines holding `TODO`, literally, under every pane's directory],
)
@@ -205,8 +205,8 @@ takes the rows: #key("k") above, #key("j") below.
= Reviewing diffs <reviewing-diffs>
-`git diff` run as a command, or a `.diff` or `.patch` opened, is drawn as
-a diff, each hunk in its file's language. #btn("B3") on:
+`git diff` run as a command, or a `.diff` or `.patch` shown as text (below),
+is drawn as a diff, each hunk in its file's language. #btn("B3") on:
#pairs(
[`diff --git`, `---`, `+++`], [the file],
@@ -214,6 +214,46 @@ a diff, each hunk in its file's language. #btn("B3") on:
[a line's `+`, `-` or space], [that line in the new file],
)
+A `.diff` or `.patch` looked at, and a diff paged (`git show`), opens as
+a `+Diff`, stacked as delta shows one: each hunk under its `path:line`
+(`Space j n`/`Space j p` step through them, #btn("B3") opens it) and the declarations
+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 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:
@@ -233,7 +273,8 @@ refusals and `--nested` are in the reference.
[#key("w") #key("d")], [select a word, delete it: motions select, edits act on the selection],
[#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; step through everything #word("Look") would open, across panes],
+ [#key("/"), #keys("n", "N")], [substring search; repeat the search in the current text, wrapping at the ends],
+ [#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],