summaryrefslogtreecommitdiff
path: root/src/normal.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-06 19:06:32 -0300
committerGabriel Schneider <[email protected]>2026-10-22 10:03:15 -0300
commit046979b877f02a91cf52cc86b84c5619cb9363d3 (patch)
treeb0a4696329949029aef88be34e242a45b1babfc4 /src/normal.zig
parentd65ec3394ff619118d9208718477469c673a5598 (diff)
downloadpardes-046979b877f02a91cf52cc86b84c5619cb9363d3.tar.gz
pardes-046979b877f02a91cf52cc86b84c5619cb9363d3.zip
Def and Refs in a language-served file's tag, a diff viewer's tinted word edits, context rows that hold still under a scroll, and the pardes skill
Def and Refs (gd, gr, Ctrl-click; chorded 2-1 at the selection) for a file a language server speaks for; hunks.zig stacks a unified diff as a diff viewer does, its changed words on a tinted ground as delta's do; the tree-sitter context rows stay put while the body glides under a scroll; .agents/skills gains the pardes skill beside pardes-9p.
Diffstat (limited to 'src/normal.zig')
-rw-r--r--src/normal.zig17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/normal.zig b/src/normal.zig
index 93487e88..aec6b983 100644
--- a/src/normal.zig
+++ b/src/normal.zig
@@ -743,14 +743,15 @@ fn executeNormalAction(p: *Pardes, t: *Text, semantic: modal.Normal.Action) void
.undo => return edit.doUndo(p, t),
.redo => return edit.doRedo(p, t),
},
- .lsp => |request| return p.lspRequest(p.active, switch (request) {
- .definition => .definition,
- .declaration => .declaration,
- .type_definition => .type_definition,
- .implementation => .implementation,
- .references => .references,
- .format => .format,
- }, ""),
+ // gd and gr are the Def and Refs a tag shows, run as a click runs them.
+ .lsp => |request| return switch (request) {
+ .definition => exec.runBuiltin(p, .Def, p.active, "", null),
+ .references => exec.runBuiltin(p, .Refs, p.active, "", null),
+ .declaration => p.lspRequest(p.active, .declaration, ""),
+ .type_definition => p.lspRequest(p.active, .type_definition, ""),
+ .implementation => p.lspRequest(p.active, .implementation, ""),
+ .format => p.lspRequest(p.active, .format, ""),
+ },
.adjust_number => |delta| return edit.normalAdjustNumber(p, t, delta),
.leader => if (p.macro.replaying == 0) {
p.leader_on = true;