helix
helix copied to clipboard
Add `unbind-default-keys` config option
Closes #2720.
There were a few changes I made to reduce confusion with some function/method locations and naming:
helix_term::keymap::merge_keyswas moved tohelix_term::config::Config::merge_keysas a method because it only operates on and changesConfig, and was modified to take a set of bindings to merge with itself. New functions were also added to handle the new optional behavior.Config::loadnow is the single source of truth for loading and merging configs, which was previously also handled inhelix_term::application::newin a slightly different but mostly redundant manner.Defaultis removed fromConfigand replaced withConfig::newandConfig::with_default_keys.newreturns a Config with no bindings whilewith_default_keysreturns a Config with the default bindings (which is the same behavior as the olddefault). This to prevent confusion between a default ruststructand helix's default keybindings as these terms were previously conflated.Config::keysno longer loads default bindings through serde when no keys are found as this was always redundant.helix_term::keymap::Keymaps::getno longer crashes when a mode isn't found. This will also help with future mode additions (likely through plugins down the line).
Let me know if any of these changes should be handled differently
Could you add some notes on using this to the docs? https://github.com/helix-editor/helix/tree/f37ffaa3a1c7754238029390db00148ec8105874/book/src
No problem. If you'd like me to include a new subsection or larger blurb, or if there's a better place to provide this specific documentation, let me know
Is there any movement on this? I'd really like to try out this feature.
I updated the feature to the current version of helix and addressed the above changes. Now it only adds the config option unbind_default_keys
https://github.com/helix-editor/helix/pull/9384#issuecomment-2065534491, https://github.com/helix-editor/helix/issues/2720#issuecomment-2065533370 - we want to solve this when we switch config away from TOML rather than adding a new config option now