feat(ui): which-key style hint popover for leader chords#58
Merged
Conversation
When the user arms a chord (<Space> or <C-w>), a small popover in the bottom-right corner now lists the available follow-up keys with their descriptions — same ergonomic as the imbuia editor. It auto-closes when the next keystroke arrives (the existing pending-chord reset logic handles dismissal whether the chord fires or is cancelled). - Leader entries are pulled live from the keymap so user overrides in keybindings.toml flow through automatically. - Ctrl+W entries are a parallel hardcoded table (the chord's keys are hardcoded in event::translate_window_chord, not in the keymap). - Session-switch shortcuts past digit 4 are filtered out to keep the popover compact; :session N still works for the rest. - Bump to 0.17.2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<Space>(or<C-w>), a small box appears in the bottom-right corner listing every available follow-up key and its description. The next keystroke either fires the bound action or silently cancels — the existing pending-chord reset already handles dismissal.keybindings.tomlshow up automatically.<C-w>entries are a parallel hardcoded table because those chord keys live inevent::translate_window_chord, not in the keymap.g-prefix gets no popover (only one follow-upg, not worth interrupting).KeyChord::human()/Chord::human()helpers to render chord notation back to<C-w>,<Space>, etc.Test plan
cargo fmt && cargo clippy --all-targets -- -D warnings && cargo test<Space>— popover listsr/R/c/e/S/C/n/0–4with descriptions; pressing any of them fires the bound action and closes the popup<Space>then<Esc>— popup closes, nothing fires<C-w>— popover listsh/l/</>