tconbeer / harlequin

The SQL IDE for Your Terminal.
https://harlequin.sh
MIT License
3.3k stars 76 forks source link

Feat: Keymaps and Keys App #580

Closed tconbeer closed 1 week ago

tconbeer commented 1 week ago

Closes #541

What are the key elements of this solution?

This ended up being a huge feature:

  1. Refactored (and improved typing of) Config files + types
  2. Created named "actions" that can be referenced by key bindings
  3. Created key bindings and key map types
  4. Replaced static BINDINGS class vars with dynamic binding mechanism
  5. Discover keymap plug-ins and user-defined (TOML) keymaps
  6. Load (and merge) the keymap(s) depending on config
  7. Bind keys to actions on widgets as they are mounted
  8. Create a vscode keymap plug-in for harlequin defaults
  9. Create a (kind of complicated) app to create keymaps
  10. Update the help screen and the online docs

Does this PR require a change to Harlequin's docs?

Did you add or update tests for this change?

Please complete the following checklist: