bazed-editor / bazed

The baz editor
Apache License 2.0
26 stars 3 forks source link

Replace purely hashmap based keymaps with function-based mappings (basically a parser-combinator style API?) #103

Open elkowar opened 1 year ago

elkowar commented 1 year ago

Currently, input-mapper expresses keymaps as nested hashmaps. This has a few very key limitations:

Optimally, every keymap would just consist of a function that takes an input, does whatever to it, and returns a new submap (-> another function) or the leaf value. This would simplify a lot of the more complex logic here, and should be possible to express relatively cleanly through a parser-combinator style API. However, it's not yet clear how we'd do descriptions with that...

This is a followup to the implementation of #86 done in #100