From 51766ee8e7c4a3e1f19d1dce4dcc2785a5eb0efb Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 24 Nov 2026 18:51:04 -0300 Subject: bindings: one binding table, a tree per root (walk UI, pick-ui SPEC.md §4.1-§4.3, item 1 of line A): SPC's from config.leader_path and config.leader_args, the helix prefixes' (g m z Z [ ]) from their roles in modal.zig and their chords in config.zig (the first role a key has is the one it runs, so zz/zc centre once; a role only a held chord types, z C-d, is not a row), window mode's (C-w) from config.window_keys with Collapse and Del, and " a root with no tree (its rows are the registers', later); all made at compile time, ordered as which-key orders them (groups first, punctuation, then a-z with a lowercase key before its capital), a builtin leaf labelled by its word (Def), a motion by its role's name without its context's word (line start), SPC's groups by the spec's names (lsp, file, ...); a group's slot in a view's memory of its last leaf (groups, ngroups); an addon's leader words joined into SPC's levels where a level is read (level: the tree's children this view takes, then the registry's 64 words at most), a level of 96 children at most; Help's rows, every leaf of every root as `chord · word · group` with its lowercase for the scorer (flat, 160 rows, comptime); docOf (a builtin's summary, a word's doc, a motion's root and description), dimmed (an LSP leaf in a pane no server speaks for), keysOf, rootOf, chord; TEST: bindings.zig's three (the SPC tree's order and leaves, the helix trees' labels, Help's rows) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- core/root.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/root.zig') diff --git a/core/root.zig b/core/root.zig index 63b77964..576454de 100644 --- a/core/root.zig +++ b/core/root.zig @@ -89,6 +89,7 @@ pub const Kind = @import("Kind.zig"); /// The terminal, as the core calls it (core/term/ behind it). pub const Term = @import("Term.zig"); pub const keys = @import("keys.zig"); +pub const bindings = @import("bindings.zig"); pub const Addon = @import("Addon.zig"); pub const dump = @import("dump.zig"); pub const lsp = @import("lsp/lsp.zig"); @@ -404,6 +405,7 @@ test { _ = @import("lsp/Ask.zig"); _ = @import("Jump.zig"); _ = @import("keys.zig"); + _ = @import("bindings.zig"); _ = @import("Effect.zig"); _ = @import("tape.zig"); _ = @import("replica.zig"); -- cgit v1.3