feature: Use `ModeChanged` autocmd to show the hints for operator-pending and visual mode
Did you check the docs?
- [X] I have read all the which-key.nvim docs
Is your feature request related to a problem? Please describe.
Currently for operators to have the which-key window show up requires them to be bound to a which-key specific mapping. This requires the user to be careful about setup order and remember to add the operator to the which-key setup (and change it if they every change the mapping. This isn't very flexible.
Describe the solution you'd like
I was thinking about it I wondered if instead of triggering the which-key menu from a keybinding, the ModeChanged autocmd could be used, perhaps along with a vim.on_key listener
Describe alternatives you've considered
Keep it as is
Additional context
No response
That's actually a really great idea.
ModeChanged together with vim.v.operator should probably work indeed!
I'd really like to see this as I have a few keymaps and plugins that register as a new operator, so having the same thing for them as y and d would be really helpful.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
I've finally got some time to do a big rewrite of which-key and it indeed now uses ModeChanged :)