Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightweight modal interface for global modes #16

Open
countvajhula opened this issue Mar 26, 2024 · 0 comments
Open

Lightweight modal interface for global modes #16

countvajhula opened this issue Mar 26, 2024 · 0 comments

Comments

@countvajhula
Copy link
Owner

In-buffer modes like Normal, Symex, Line, Character, Word modes are currently implemented using Evil.

Global modes like Window, Buffer, View modes are currently implemented using Hydra.

Hydra doesn't provide lifecycle hooks for every stage of entry and exit from a Hydra, since it isn't exactly designed to be a modal interface (although it's a pretty good one!). This means that we cannot always detect when certain things have happened, and thus, "recalling" appropriate in-buffer modes when exiting a hydra isn't always possible, and we sometimes end up in the wrong state, or aren't able to perform other necessary exit actions (see #10 ).

There may be many ways to address this, but for now, to get a prototype working in the intended way, it would be good to write a lightweight modal interface, perhaps just a global minor mode that uses an emulation mode keymap, and see if, once it is abstracted as a Chimera modal interface provider, if we can restore the correct behavior in terms of hooks and entry/exit actions.

That would of course lose the nice menus that we get with Hydra. But once we have the lifecycle working, we would at least have a clearer idea of the hooks that are needed, and whether it would make sense to continue using Hydra or add a menu to the lightweight modal interface. It would be easy enough, with Chimera, to swap them whenever we like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant