diff options
Diffstat (limited to 'src/normal.zig')
| -rw-r--r-- | src/normal.zig | 17 |
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; |
