summaryrefslogtreecommitdiff
path: root/docs/typ
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-25 05:03:22 -0300
committerGabriel Schneider <[email protected]>2026-11-25 05:10:14 -0300
commit7611e1bb7a1c3eda2f4ac463881f543653abd035 (patch)
treeb0ea5bb10dceaf3db2db7f9b06e7641f3e09ea57 /docs/typ
parent36e5561ed6135e2c66f1e0813b037f34a1249eda (diff)
downloadpardes-7611e1bb7a1c3eda2f4ac463881f543653abd035.tar.gz
pardes-7611e1bb7a1c3eda2f4ac463881f543653abd035.zip
lsp_client, Ask, Pick, body_layer: code actions as a picker (walk UI P3 item 1, SPEC §5.1 "actions", §14.1, POLISH 17): the client sent each action's title alone (lsp_client run `.code_action`), so `SPC l a` could only list them in a +Lsp, nothing to preview or apply; NOW the client writes each action's row and after it its edit of this file as `@put` records (actionEdits, sorted, sharing renameEdits' WorkspaceEdit reading as editFiles), `@elsewhere` for an edit that reaches another file or makes one (never a part of it applied), none for a command's; an action the server sent without its edit but with `data` is asked for it with codeAction/resolve when the server says resolveProvider (Caps.resolve_actions); typed where jumps walk (Ask's `ghost`, recorded at ask time as the hover's) the answer is Pick's new source `actions` in the asking pane's own tag (`␣ l a Actions`, its host the edited pane as the themes picker's), each row its digit in the key ink then the title (the query matches the title), the body moved to the edit's first line while it is under the cursor and showing its edit as ghost rows (Pick.ghosts, drawn after Prompt.ghosts by the body layer: the lines it changes on the Changes layer's deleted ground, what they become after them on the added ground, the rows below pushed down; R3, DESIGN D4 add/del; bounded by the rows shown), Enter or `1`-`9` with the field empty applies it as one undo step through Ask.applyAction (applyLspEdits, of the revision it was asked of: Pick.revision), the tag at rest first; a command's or an elsewhere edit is said, not applied; anyone else's (a 9P script) keeps the +Lsp of titles; the mock (test/lspmock.zig) answers three actions: a title alone, one with its edit (a line put in at the top), one resolved (main.rs's two `add` calls to `sum`); CodeAction's doc and the builtins json say so; TESTS: core/Pick.zig "code actions: a picker in the asking pane's tag ..." (ghost rows and grounds rendered, `3` applies, `u` undoes, a command's said), test/behaviour/language_servers.zig "SPC l a lists the server's code actions in the pane's tag by their digits ..." (through the mock end to end, resolve included; on the base `SPC l a` makes a +Lsp); core-test 1063/1233 (170 skipped), behaviour-test 279/279, shell-test's edit tests 89/89
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'docs/typ')
-rw-r--r--docs/typ/builtins-gui.json2
-rw-r--r--docs/typ/builtins-tui.json2
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/typ/builtins-gui.json b/docs/typ/builtins-gui.json
index 6466a845..b2814d5c 100644
--- a/docs/typ/builtins-gui.json
+++ b/docs/typ/builtins-gui.json
@@ -17,7 +17,7 @@
{"name": "ClipReplace", "leader": "SPC R", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Replace the selection with the system clipboard.", "text": "Replace the selection with the system clipboard."},
{"name": "ClipYank", "leader": "SPC y", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Copy the selection to the system clipboard.", "text": "Copy the selection to the system clipboard.\nEvery cursor's selection, joined; in an image or a PDF's pane, what it has selected."},
{"name": "ClipYankMain", "leader": "SPC Y", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Copy the primary selection alone to the system clipboard.", "text": "Copy the primary selection alone to the system clipboard.\nClipYank (`SPC y`) copies every cursor's selection, joined; with one cursor the two are the same."},
- {"name": "CodeAction", "leader": "SPC l a", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the language server's code actions for the cursor, in a +Lsp.", "text": "List the language server's code actions for the cursor, in a +Lsp."},
+ {"name": "CodeAction", "leader": "SPC l a", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the language server's code actions for the cursor, to apply one.", "text": "List the language server's code actions for the cursor, to apply one.\nTyped where jumps walk, they are a picker in the pane's tag, the one under the cursor shown as its edit, applied by Enter or its digit; else a +Lsp lists them."},
{"name": "Collapse", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Fold this pane to its tag, or give it its share of the column again.", "text": "Fold this pane to its tag, or give it its share of the column again."},
{"name": "Compare", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Draw the file's difference between each two jj revisions as one change, as Changes draws one.", "text": "Draw the file's difference between each two jj revisions as one change, as Changes draws one.\n`Compare <rev> <rev> [<rev> ...]`: two points or more in their order, each one revision (a commit or change id, a bookmark, `master@origin`, `@`): `Compare 9ef6312813 ea63317630 master@origin`. A pair is drawn as one change however many lie between its points; after its last line, its row: the two points, how many changes lie between them, their first and last days. One set a pane: a later Changes or Compare replaces it. Bare: as bare Changes."},
{"name": "Config", "leader": "SPC f c", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the startup file, `init` in the configuration directory, in a pane.", "text": "Open the startup file, `init` in the configuration directory, in a pane.\nIts pane when it is open, else the file; not there yet, a pane of that name, which Save makes, its directory too."},
diff --git a/docs/typ/builtins-tui.json b/docs/typ/builtins-tui.json
index 70d7c73d..0f7e3896 100644
--- a/docs/typ/builtins-tui.json
+++ b/docs/typ/builtins-tui.json
@@ -17,7 +17,7 @@
{"name": "ClipReplace", "leader": "SPC R", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Replace the selection with the system clipboard.", "text": "Replace the selection with the system clipboard."},
{"name": "ClipYank", "leader": "SPC y", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Copy the selection to the system clipboard.", "text": "Copy the selection to the system clipboard.\nEvery cursor's selection, joined; in an image or a PDF's pane, what it has selected."},
{"name": "ClipYankMain", "leader": "SPC Y", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Copy the primary selection alone to the system clipboard.", "text": "Copy the primary selection alone to the system clipboard.\nClipYank (`SPC y`) copies every cursor's selection, joined; with one cursor the two are the same."},
- {"name": "CodeAction", "leader": "SPC l a", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the language server's code actions for the cursor, in a +Lsp.", "text": "List the language server's code actions for the cursor, in a +Lsp."},
+ {"name": "CodeAction", "leader": "SPC l a", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the language server's code actions for the cursor, to apply one.", "text": "List the language server's code actions for the cursor, to apply one.\nTyped where jumps walk, they are a picker in the pane's tag, the one under the cursor shown as its edit, applied by Enter or its digit; else a +Lsp lists them."},
{"name": "Collapse", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Fold this pane to its tag, or give it its share of the column again.", "text": "Fold this pane to its tag, or give it its share of the column again."},
{"name": "Compare", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Draw the file's difference between each two jj revisions as one change, as Changes draws one.", "text": "Draw the file's difference between each two jj revisions as one change, as Changes draws one.\n`Compare <rev> <rev> [<rev> ...]`: two points or more in their order, each one revision (a commit or change id, a bookmark, `master@origin`, `@`): `Compare 9ef6312813 ea63317630 master@origin`. A pair is drawn as one change however many lie between its points; after its last line, its row: the two points, how many changes lie between them, their first and last days. One set a pane: a later Changes or Compare replaces it. Bare: as bare Changes."},
{"name": "Config", "leader": "SPC f c", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the startup file, `init` in the configuration directory, in a pane.", "text": "Open the startup file, `init` in the configuration directory, in a pane.\nIts pane when it is open, else the file; not there yet, a pane of that name, which Save makes, its directory too."},