summaryrefslogtreecommitdiff
path: root/docs/typ
diff options
context:
space:
mode:
Diffstat (limited to 'docs/typ')
-rw-r--r--docs/typ/builtins-gui.json6
-rw-r--r--docs/typ/builtins-tty.json6
-rw-r--r--docs/typ/guide.typ15
-rw-r--r--docs/typ/reference.typ27
-rw-r--r--docs/typ/setup.typ2
5 files changed, 39 insertions, 17 deletions
diff --git a/docs/typ/builtins-gui.json b/docs/typ/builtins-gui.json
index b42f9c72..83a410dc 100644
--- a/docs/typ/builtins-gui.json
+++ b/docs/typ/builtins-gui.json
@@ -20,12 +20,15 @@
{"name": "Crt", "leader": "SPC t r", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off, 0-3", "doc": "The bundled CRT post pass over the window, on or off."},
{"name": "CursorBlink", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "The cursor blinks, solid while typing, on or off."},
{"name": "Debug", "leader": "SPC t d", "also": ["topbar"], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A small box of frame statistics at the top right, on or off."},
+ {"name": "Def", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Go to the definition of the symbol under the cursor; with an argument (a 2-1 chord's selection), of that symbol, where it is nearest."},
{"name": "Del", "leader": "SPC d", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Close the pane."},
{"name": "DelAbove", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Close the pane, giving its rows to the pane above it."},
{"name": "DelBelow", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Close the pane, giving its rows to the pane below it."},
{"name": "Delcol", "leader": "SPC c d", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Close this column and its panes, refusing once over unsaved text."},
{"name": "Detach", "leader": "SPC s D", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Detach this pardes from its terminal, leaving the session running."},
{"name": "Diagnostics", "leader": "SPC l d", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the file's diagnostics from the language server."},
+ {"name": "Diff", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Stack a diff's hunks as a diff viewer shows them, each under its place and the declarations around it, in a +Diff; on a +Diff, show the diff itself as text."},
+ {"name": "DiffLook", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "hunks, text", "doc": "A .diff or .patch looked at: hunks, a +Diff stacking its hunks, or text, the file itself; Diff goes from one to the other."},
{"name": "DirLook", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "pane, terminal", "doc": "A directory looked at: pane, a pane listing it as acme's directory window, or terminal, ls in a terminal there."},
{"name": "Down", "leader": "SPC w j", "also": ["C-w j", "C-w down"], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane below, off a tag onto the pane under it."},
{"name": "Dump", "leader": "SPC s d", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Write the session's panes and layout to a dump file, for Restore."},
@@ -36,7 +39,7 @@
{"name": "EffectCode", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Open the source of a panel transition or post shader, by name."},
{"name": "Exec", "leader": null, "also": ["tab", "middle-click"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Execute its argument as a middle click on it would, a builtin or a shell command."},
{"name": "Exit", "leader": "SPC q", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Quit the editor, refusing once while a pane holds unsaved text: an Exit with nothing edited since discards it."},
- {"name": "Filter", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Recolour a terminal's program colours to the theme, or show them as sent, flipping between them."},
+ {"name": "Filter", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Recolour a terminal's or a +Pager's program colours to the theme, or show them as sent, flipping between them."},
{"name": "Find", "leader": "SPC f f", "also": ["topbar"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "List the files below this pane's directory whose names hold its argument, in a +Search."},
{"name": "FocusTint", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "The focused pane's and column's tags are tinted, on or off."},
{"name": "Font", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "The body font, by name or path, and its size."},
@@ -103,6 +106,7 @@
{"name": "Putall", "leader": null, "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "acme's Putall: every pane holding unsaved edits to a file is saved, each as its own Save; one that is refused (changed on disk since, a write that fails) says so and the rest are saved all the same."},
{"name": "Recent", "leader": "SPC f r", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "List the files opened lately, closed ones too, each a place to open again."},
{"name": "Redo", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Redo the last undone edit."},
+ {"name": "Refs", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "List the references to the symbol under the cursor; with an argument (a 2-1 chord's selection), to that symbol, where it is nearest."},
{"name": "Rename", "leader": "SPC l r", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Rename the symbol under the cursor everywhere, to its argument."},
{"name": "Repl", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Binds this terminal as a language's REPL, so an exec on that language's files is typed into it instead of run."},
{"name": "Restore", "leader": "SPC s r", "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Replace every pane with those of a dump file, the last one Dump wrote when bare."},
diff --git a/docs/typ/builtins-tty.json b/docs/typ/builtins-tty.json
index 53bcf033..35e12875 100644
--- a/docs/typ/builtins-tty.json
+++ b/docs/typ/builtins-tty.json
@@ -17,12 +17,15 @@
{"name": "Colors", "leader": "SPC t c", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Syntax colours in text panes, on or off."},
{"name": "Config", "leader": "SPC f c", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the startup file, `init`, in a pane: its pane when it is open, else the file, else a pane of that name for Save to make it and its directory."},
{"name": "Debug", "leader": "SPC t d", "also": ["topbar"], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A small box of frame statistics at the top right, on or off."},
+ {"name": "Def", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Go to the definition of the symbol under the cursor; with an argument (a 2-1 chord's selection), of that symbol, where it is nearest."},
{"name": "Del", "leader": "SPC d", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Close the pane."},
{"name": "DelAbove", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Close the pane, giving its rows to the pane above it."},
{"name": "DelBelow", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Close the pane, giving its rows to the pane below it."},
{"name": "Delcol", "leader": "SPC c d", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Close this column and its panes, refusing once over unsaved text."},
{"name": "Detach", "leader": "SPC s D", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Detach this pardes from its terminal, leaving the session running."},
{"name": "Diagnostics", "leader": "SPC l d", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the file's diagnostics from the language server."},
+ {"name": "Diff", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Stack a diff's hunks as a diff viewer shows them, each under its place and the declarations around it, in a +Diff; on a +Diff, show the diff itself as text."},
+ {"name": "DiffLook", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "hunks, text", "doc": "A .diff or .patch looked at: hunks, a +Diff stacking its hunks, or text, the file itself; Diff goes from one to the other."},
{"name": "DirLook", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "pane, terminal", "doc": "A directory looked at: pane, a pane listing it as acme's directory window, or terminal, ls in a terminal there."},
{"name": "Down", "leader": "SPC w j", "also": ["C-w j", "C-w down"], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane below, off a tag onto the pane under it."},
{"name": "Dump", "leader": "SPC s d", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Write the session's panes and layout to a dump file, for Restore."},
@@ -33,7 +36,7 @@
{"name": "EffectCode", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Open the source of a panel transition or post shader, by name."},
{"name": "Exec", "leader": null, "also": ["tab", "middle-click"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Execute its argument as a middle click on it would, a builtin or a shell command."},
{"name": "Exit", "leader": "SPC q", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Quit the editor, refusing once while a pane holds unsaved text: an Exit with nothing edited since discards it."},
- {"name": "Filter", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Recolour a terminal's program colours to the theme, or show them as sent, flipping between them."},
+ {"name": "Filter", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Recolour a terminal's or a +Pager's program colours to the theme, or show them as sent, flipping between them."},
{"name": "Find", "leader": "SPC f f", "also": ["topbar"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "List the files below this pane's directory whose names hold its argument, in a +Search."},
{"name": "FocusTint", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "The focused pane's and column's tags are tinted, on or off."},
{"name": "Forward", "leader": "SPC j i", "also": ["C-i"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Ctrl-i: one step forward again, up to wherever Back started."},
@@ -90,6 +93,7 @@
{"name": "Putall", "leader": null, "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "acme's Putall: every pane holding unsaved edits to a file is saved, each as its own Save; one that is refused (changed on disk since, a write that fails) says so and the rest are saved all the same."},
{"name": "Recent", "leader": "SPC f r", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "List the files opened lately, closed ones too, each a place to open again."},
{"name": "Redo", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Redo the last undone edit."},
+ {"name": "Refs", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "List the references to the symbol under the cursor; with an argument (a 2-1 chord's selection), to that symbol, where it is nearest."},
{"name": "Rename", "leader": "SPC l r", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Rename the symbol under the cursor everywhere, to its argument."},
{"name": "Repl", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Binds this terminal as a language's REPL, so an exec on that language's files is typed into it instead of run."},
{"name": "Restore", "leader": "SPC s r", "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Replace every pane with those of a dump file, the last one Dump wrote when bare."},
diff --git a/docs/typ/guide.typ b/docs/typ/guide.typ
index 90e72303..89323766 100644
--- a/docs/typ/guide.typ
+++ b/docs/typ/guide.typ
@@ -202,8 +202,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],
@@ -211,6 +211,17 @@ 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`
+(`n`/`N` 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 folded under it), and on the text stacks
+it again; #word("DiffLook") `text` in the startup file opens the text
+first.
+
= `pardes FILE` and `--wait` <editor>
In a pane's shell:
diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ
index ed88905a..909c1e1a 100644
--- a/docs/typ/reference.typ
+++ b/docs/typ/reference.typ
@@ -22,7 +22,7 @@ index a line per pane: serial kind dirty name column @ru
status pid, version, panes @other-files
look write a line: a #word("Look") at the pane with the keyboard; read: the serials touched @look-and-exec
exec write a line: an #word("Exec") there; read: the serials touched @look-and-exec
-pager write a directory: its one +Pager, made or emptied; read: its serial @pardes-stdin
+pager write a directory: a new +Pager there; read: its serial @pardes-stdin
log the event log; write follow to wait for more @log
screen the rendered screen as JSON @on-screen
listeners dial addresses @other-files
@@ -252,7 +252,9 @@ A line written to #file("exec") is #word("Exec"):
silently, here and in every ctl.
- The language server's words ask about a file pane's text at its cursor
(set it with #file("addr") and `dot=addr` first): #word("Hover") fills
- `+Hover`; #word("Rename") `new` renames the symbol in the file and says how many
+ `+Hover`; #word("Def") and #word("Refs"), in the tag of a file a server
+ speaks for, are `gd` and `gr`, and given a symbol (a 2-1 chord's
+ selection) ask at its occurrence nearest the cursor; #word("Rename") `new` renames the symbol in the file and says how many
ranges it changed (on the message row, and so in the log) without listing
them, and fails when there is nothing to rename. One that reaches other
files applies nothing: it opens a `+Search` preview of the edits, which
@@ -457,7 +459,7 @@ may lower the contrast of text, the selection or a focus indicator.
build embeds them.
Resting the pointer on text for about 32 ms (`look_preview_delay_frames`,
-2 frames, in `src/config.zig`; `null` turns it off) tints what #word("Look") would take, with no other effect. A terminal's
+2 frames, in `src/config.zig`; `null` turns it off) tints what #word("Look") would take, with no other effect. A terminal's or a `+Pager`'s
#word("Filter") keeps each foreground at least `tty_filter_min_contrast`
(WCAG 1.5, `src/config.zig`) against its background.
@@ -889,10 +891,10 @@ at 200, ending in `…`. Control characters become spaces.
line is the session's; one not there is refused ENOENT, a relative one
EINVAL, one you may not write `permission denied`, a regular file `not
a directory`, ENOTDIR), one line; what follows that line, on the same open, is the text to
- page, escapes and all. A read of that open answers the serial of the
- directory's one `+Pager`, made or emptied for it, once the text is in. This is what
- `pardes -` uses; from a directory you may not write, it pages into the
- session's `+Pager`.
+ page, escapes and all. A read of that open answers the serial of a new
+ `+Pager` in the directory, once the text is in. This is what
+ `pardes -` uses; from a directory you may not write, it pages into a
+ `+Pager` of the session's.
- #file("/listeners"): the session's dial addresses, a line each
(#doc("building", section: "listeners")).
- #file("/os/"): existing regular files take read, write and truncation to
@@ -993,12 +995,13 @@ it was.
= pardes - <pardes-stdin>
-`pardes -` reads stdin to its end and shows it in the directory's one
-`+Pager` pane, made or emptied for it and left clean, opening at its top;
-the next paged text refills it. The session parses the text with
+`pardes -` reads stdin to its end and shows it in a new `+Pager` pane of
+the directory, left clean, opening at its top, with no line numbers; a
+`+Pager` already there keeps its page. The session parses the text with
ghostty-vt: SGR colours become the `+Pager`'s own display, never part of
-its body or any read (#word("PagerColor") `off` pages plain), and every other
-escape is dropped; a carriage return keeps a progress line's last state,
+its body or any read (#word("PagerColor") `off` pages plain), mapped
+through the theme as a terminal's are until its #word("Filter") shows them
+as sent; every other escape is dropped; a carriage return keeps a progress line's last state,
and CRLF becomes LF. Empty stdin shows nothing. Inside a pardes pane it returns at once; a text the session cannot
take is printed to stderr with why, and the exit is 1. From a directory
whose name holds a newline or control byte, the pane is the session
diff --git a/docs/typ/setup.typ b/docs/typ/setup.typ
index df99a45f..f49c9075 100644
--- a/docs/typ/setup.typ
+++ b/docs/typ/setup.typ
@@ -59,7 +59,7 @@ fi
= A pager <pager>
-#cmd("ls --color=always | pardes - # into the directory's +Pager, colours kept")
+#cmd("ls --color=always | pardes - # into a new +Pager there, colours kept")
With #word("Pager") `pardes` (the default) a terminal's shell gets
`PAGER`, `GIT_PAGER` and `SYSTEMD_PAGER` set to it (and