summaryrefslogtreecommitdiff
path: root/core/root.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-24 18:51:04 -0300
committerGabriel Schneider <[email protected]>2026-11-24 18:51:04 -0300
commit51766ee8e7c4a3e1f19d1dce4dcc2785a5eb0efb (patch)
treef24d64dcc90913ce340ef74a9bbeb2b3f2a5df8f /core/root.zig
parente9f3712ce17f9813ecb15dbf76d46778a49c747d (diff)
downloadpardes-51766ee8e7c4a3e1f19d1dce4dcc2785a5eb0efb.tar.gz
pardes-51766ee8e7c4a3e1f19d1dce4dcc2785a5eb0efb.zip
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)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'core/root.zig')
-rw-r--r--core/root.zig2
1 files changed, 2 insertions, 0 deletions
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");