Repository navigation
Conversation
Add a custom variable `ivy-action-display-style' to optionally toggle the use of a hydra-style docstring as hint in the `ivy-read-action' minibuffer prompt. Add a variable `ivy--action-hints-lists' and a command `ivy-set-action-hint' to customize this string globally or per command. This gives some flexibility to arrange the layout of the action prompt, which can be useful especially for commands with a large number of actions. Add a function `ivy-hydra--make-action-hint' which is called by `ivy-read-action' to build the docstring when `ivy-action-display-style' is set to 'hydra. This function is defined in ivy-hydra.el since it depends on the hydra package, and is autoloaded in ivy.el.
|
Looks to me like a whole lot of complexity to customize a face. Or am I missing something? |
|
Sorry, I think I was not clear. My purpose is not to change the font of the action key, it is be able to structure the layout of the actinos. For instance I have a But you may be right that it is too complex for a small benefit. For the record, another possibility (this is what I first did) is to have a full-blown that not only generates the hint but also runs |
I can just make this into a lambda: And let the user override it. Would that work for you? |
|
Yes that would of course work for me by overriding the lambda. Thanks a lot. |
|
Have a look, hope it works for you. |
|
Yes it works perfectly, thank you! |
In case you find it useful (it is useful to me for ivy-read commands with many actions).
There is really just one commit, I probably did something wrong to end up with two identical ones. Let me know if you need me to make changes.
ivy-action-display-styleto optionally togglethe use of a
hydra-style docstring as hint in theivy-read-actionminibuffer prompt.
ivy--action-hints-listsand a commandivy-set-action-hintto customize this string globally orper command. This gives some flexibility to arrange the layout of the
action prompt, which can be useful especially for commands with a large
number of actions.
ivy-hydra--make-action-hintwhich is called byivy-read-actionto build the docstring whenivy-action-display-styleis set to
'hydra. This function is defined inivy-hydra.elsince itdepends on the
hydrapackage, and is autoloaded in ivy.el.