diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-23 16:02:38 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-23 16:04:57 -0300 |
| commit | 3c93e82e7f3ab85bd181b36346bb22c532e09d9a (patch) | |
| tree | 6d854e1c72b786d94bdcb0b6c8351d0881d9f446 /core/builtins.zig | |
| parent | c6a5a40f68f8a341961b1475addc73bb0de9a0f3 (diff) | |
| download | pardes-3c93e82e7f3ab85bd181b36346bb22c532e09d9a.tar.gz pardes-3c93e82e7f3ab85bd181b36346bb22c532e09d9a.zip | |
help: the language words documented for a user (item 5's sixth group: `Def`, `Refs`, `Hover`, `CodeAction`, `SelectRefs`, `Symbols`, `Diagnostics`, `WsDiagnostics`, `Index`, `Callstack`, `Callers`, `Callees`, `Supertypes`, `Subtypes`, `Rename`, `WsSymbols`, `Lspinfo`, `Lspwhy`), each sentence checked against its run (core/builtins.zig: each is `lspRequest` of a kind; core/Output.zig `traits`: where each kind's answer goes, +Search, +Hover, +Lsp, +Callstack, and which kinds jump on one answer) and the reference's paragraph on the language server's words and the guide's "Call hierarchy": Def and Refs (with a 2-1 chord's selection, at its occurrence nearest the cursor; one answer a jump; `g d`, `g r`), Hover, CodeAction, Symbols, Diagnostics (`] d`, `[ d`, `] D`, `[ D`), WsDiagnostics and WsSymbols (in a +Search; bare asks), Index (what it writes, and that the language words ask the nearest index.scip first), Callstack (the tree, outermost first, its places and signatures, tests last, `↻`, CallstackDepth, `g c`: the Help pane's paragraph "Callstack: static caller chains, with signatures and clickable call sites. Callers / Callees: one direction at a time." deleted in item 3 is said here and in Callers' and Callees' "one level up/down"), Supertypes and Subtypes (one answer a jump), Rename (bare asks; in this file at once, saying how many; across files a +Search of its edits, nothing changed), Lspinfo, Lspwhy; docs/typ/builtins-tui.json regenerated
Co-Authored-By: Claude Opus <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/builtins.zig')
| -rw-r--r-- | core/builtins.zig | 68 |
1 files changed, 49 insertions, 19 deletions
diff --git a/core/builtins.zig b/core/builtins.zig index fb072141..626e8ec3 100644 --- a/core/builtins.zig +++ b/core/builtins.zig @@ -2047,8 +2047,9 @@ pub const Jumplist = struct { /// 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. +/// With an argument (a 2-1 chord's selection), of that symbol, asked at its +/// occurrence nearest the cursor. One answer is a jump; several open a list, +/// the keyboard on its current row; none says so. `g d` does the same. pub const Def = struct { pub const takes_arg = true; /// Its answer says what it found, a jump or a list or why not; its @@ -2061,8 +2062,9 @@ pub const Def = struct { /// 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. +/// With an argument (a 2-1 chord's selection), to that symbol, asked at its +/// occurrence nearest the cursor; a single reference is a jump. `g r` does +/// the same. pub const Refs = struct { pub const takes_arg = true; pub const quiet = true; // as Def @@ -2071,14 +2073,15 @@ pub const Refs = struct { } }; -/// Ask the language server about the symbol under the cursor. +/// Ask the language server about the symbol under the cursor, its answer in a +/// +Hover. pub const Hover = struct { pub fn run(c: Ctx) void { c.p.lspRequest(c.id, .hover, ""); } }; -/// List the language server's code actions for the cursor. +/// List the language server's code actions for the cursor, in a +Lsp. pub const CodeAction = struct { pub fn run(c: Ctx) void { c.p.lspRequest(c.id, .code_action, ""); @@ -2092,21 +2095,24 @@ pub const SelectRefs = struct { } }; -/// List the file's symbols from the language server. +/// List this file's symbols in a +Search. pub const Symbols = struct { pub fn run(c: Ctx) void { c.p.lspRequest(c.id, .document_symbols, ""); } }; -/// List the file's diagnostics from the language server. +/// List this file's diagnostics in a +Search. +/// +/// `] d` and `[ d` step through them in the text, `] D` and `[ D` to the last +/// and the first. pub const Diagnostics = struct { pub fn run(c: Ctx) void { c.p.lspRequest(c.id, .diagnostics, ""); } }; -/// List the workspace's diagnostics from the language server. +/// List the diagnostics of the whole workspace in a +Search. pub const WsDiagnostics = struct { pub fn run(c: Ctx) void { c.p.lspRequest(c.id, .workspace_diagnostics, ""); @@ -2116,49 +2122,66 @@ pub const WsDiagnostics = struct { /// Run the file's language indexer at its project root, writing its /// index.scip. /// -/// The language words ask that index first. +/// The language words ask the nearest index.scip above a file first, and its +/// language server only when the index has nothing to say; an index older +/// than the file still answers, and says so once. pub const Index = struct { pub fn run(c: Ctx) void { c.p.lspRequest(c.id, .index, ""); } }; -/// Show outermost callers first, with signatures and call sites (gc). +/// Show the callers of the function under the cursor as a tree, outermost +/// first, in a +Callstack. +/// +/// Each caller with its place to open and its signature, the line of each +/// call under it; callers named for tests after the rest, a recursion marked +/// `↻`. CallstackDepth sets how many levels (8 by default); a deeper tree +/// says where to go on from. `g c` does the same. pub const Callstack = struct { pub fn run(c: Ctx) void { c.p.lspRequest(c.id, .callstack, ""); } }; -/// List the callers of the function under the cursor. +/// List the functions that call the one under the cursor, one level up; a +/// single one is a jump. pub const Callers = struct { pub fn run(c: Ctx) void { c.p.lspRequest(c.id, .incoming_calls, ""); } }; -/// List the functions the function under the cursor calls. +/// List the functions the one under the cursor calls, one level down; a +/// single one is a jump. pub const Callees = struct { pub fn run(c: Ctx) void { c.p.lspRequest(c.id, .outgoing_calls, ""); } }; -/// List the supertypes of the type under the cursor. +/// List the supertypes of the type under the cursor in a +Search; a single +/// one is a jump. pub const Supertypes = struct { pub fn run(c: Ctx) void { c.p.lspRequest(c.id, .supertypes, ""); } }; -/// List the subtypes of the type under the cursor. +/// List the subtypes of the type under the cursor in a +Search; a single one +/// is a jump. pub const Subtypes = struct { pub fn run(c: Ctx) void { c.p.lspRequest(c.id, .subtypes, ""); } }; -/// Rename the symbol under the cursor everywhere, to its argument. +/// Rename the symbol under the cursor to its argument, wherever the language +/// server finds it. +/// +/// Bare, it asks for the new name. Within this file it is done at once, +/// saying how many places changed; one that reaches other files changes +/// nothing and lists its edits in a +Search to look over. pub const Rename = struct { pub const takes_arg = true; pub const requires_arg = true; @@ -2169,7 +2192,8 @@ pub const Rename = struct { } }; -/// Search the workspace's symbols for its argument. +/// Search the workspace's symbols for its argument, in a +Search; bare, it +/// asks for the name. pub const WsSymbols = struct { pub const takes_arg = true; pub const requires_arg = true; @@ -2180,14 +2204,20 @@ pub const WsSymbols = struct { } }; -/// Show which language servers serve this file and their state. +/// Show which index and language server serve this file, and their state, in +/// a +Lsp. +/// +/// The index.scip it asks (or the Index that would write one), its server and +/// the server's state (not started yet, failed and waiting to retry), and +/// what answered each query lately. pub const Lspinfo = struct { pub fn run(c: Ctx) void { c.p.lspRequest(c.id, .status, ""); } }; -/// Explain how the last language server request was answered, step by step. +/// Explain, step by step in a +Lsp, how the last language server request was +/// answered. pub const Lspwhy = struct { pub fn run(c: Ctx) void { c.p.lspRequest(c.id, .explain, ""); |
