Conversation
Implements user-facing JSON keymap configuration following the ThemeManager pattern. Users can now customize all keybindings by creating JSON files in ~/.sqlit/keymaps/ and setting custom_keymap in settings.json. Features: - KeymapManager class for loading/validating custom keymaps - FileBasedKeymapProvider implementing KeymapProvider interface - JSON structure with leader_commands and action_keys arrays - Graceful error handling (invalid configs don't crash app) - Comprehensive test suite (11 tests covering all scenarios) - User documentation with examples and troubleshooting - Template keymap showing all default bindings Integration: - Loads during app startup after theme initialization - Settings key: custom_keymap (default/name) - Directory: ~/.sqlit/keymaps/ - Follows established sqlit configuration patterns Files: - sqlit/core/keymap_manager.py: Manager implementation - config/keymap.template.json: User template with examples - docs/custom-keymaps.md: Complete user guide - tests/ui/keybindings/test_keymap_manager.py: Test coverage This enables power users to customize keybindings per CONTRIBUTING.md line 243 which explicitly permits keyboard binding customization.
|
Files you can use as keymaps: https://gist.github.com/xtrasmal/1c15deb40b0caeaae0740648b802b4d9 |
|
I would love this feature, especially since the auto-compeltion I prefer C-N / C-P as selection and C-K as accepting selection. |
|
Oh this is incredible. Custom keybindings are the only thing preventing me from fully switching over to +1'ing in hopes this PR sees a merge and release. 🙏 |
|
Great idea, thanks. @xtrasmal I think it would make more sense if the custom keymap was additive, meaning you only replace the keymaps of the JSON you've configured. So that you don't need to paste in the entire JSON just to replace one or two keybindings. I would like to see that the keyhints in the footer and the help menu reflect the custom keybindings too. Let me know what you think. |
Implements user-facing JSON keymap configuration following the ThemeManager pattern. Users can now customize all keybindings by creating JSON files in ~/.sqlit/keymaps/ and setting custom_keymap in settings.json.
Features:
Integration:
Files:
This enables power users to customize keybindings per CONTRIBUTING.md line 243 which explicitly permits keyboard binding customization.