From ea228d1b832401db8efe33a5db4099ba41d42509 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 31 Jul 2026 00:26:12 -0300 Subject: config.zig: every binding and every piece of Look syntax in one file Retargeting a key, a mouse chord or a spelling is now an edit to src/config.zig and nothing else. Three parts in reading order: pardes's own bindings (where a reader lands), the Look/Exec syntax, then the helix keymap under a banner saying hxdiff/hxparity are differential suites against real helix, so a key moved there is a divergence and not a tweak. The bindings are data a comptime loop can walk, because the builtin index is going to walk them. Duplication this cut: is/isC/isA became one hit(key, chords) over ~132 call sites, and a binding being a LIST collapses the letter-or-arrow chains; swap_enter_tab is gone, replaced by look_key/exec_key that can point anywhere; the four focus builtins' h/j/k/l lived hardcoded in two places and is now one table. No golden moved. --- src/lsp/lsp.zig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/lsp') diff --git a/src/lsp/lsp.zig b/src/lsp/lsp.zig index 536047a3..610c5604 100644 --- a/src/lsp/lsp.zig +++ b/src/lsp/lsp.zig @@ -17,6 +17,7 @@ //! implementations are measured against each other: same core, same harness, //! same rows, different `query`. const std = @import("std"); +const config = @import("../config.zig"); /// What the caller wants to know. The helix command each one backs is named /// alongside, because the keymap is helix's and these are its verbs. @@ -75,11 +76,11 @@ pub const Kind = enum { /// content is not a list of locations — n/N over prose is nonsense. pub fn bufferName(k: Kind) []const u8 { return switch (k) { - .hover => "+Hover", - .code_action, .format, .rename => "+Lsp", + .hover => config.hover_buffer, + .code_action, .format, .rename => config.lsp_buffer, // prose about the backend, never a list of locations - .status, .explain => "+Lsp", - else => "+Search", + .status, .explain => config.lsp_buffer, + else => config.search_buffer, }; } }; -- cgit v1.3