Expand description
The keymap guest→host binding-registration seam (PL8.D.1).
A keymap plugin implements the keymap-plugin world: it imports the
keymap API (register-binding) and exports register-keymap (the host
calls it once to drive registration). This module holds the bindgen! for
that world plus the host-side bind logic — factored here (the config_host
precedent) so it is unit-testable without a Store.
The canonical API is the WIT (keymap.wit) — any component-model language
calls register-binding directly. The first consumer is the user’s init.rs:
a plain global keybind is the one config kind with no other seam. Bindings
land in KeymapLayer::User, gated by
KeymapCapability::User — above the
built-in vim grammar, never KeymapLayer::Builtin (the standing
keymap-ownership rule). Binding resolution on every keystroke stays native
(the KeymapHandle trie), so there is no per-keystroke WASM — the seam rides
the async linker, registration-only.
Structs§
- Keymap
Binding Token - A user keybinding the plugin registered — the teardown token (PL8.D.2): the
KeymapLayer::Userentry for(mode, chord)is unbound on unload.chordis the vim-notation string as the guest supplied it (re-parsed at unbind).