Open montchr opened 4 months ago
Thanks for pointing this. The meow-*-define-key
helpers are just wrappers on define-key
.
(meow-leader-define-key '("y" . ("yas" . yas-keymap)))
@DogLooksGood Right, though my suggestion is that Meow could, like which-key, use the additional description text in the leader popup to replace the default +prefix
text if the user specifies a description. Currently, the description doesn’t have any effect because AFAIK it would need to be explicitly supported in the code that generates the popup text. I know you’ve been suggesting that users who have issues with the popup behavior should use which-key instead, but if the meow popup is still a supported feature here, supporting some way of overriding the key descriptions would be nice to have.
If the issue I’m describing with the default text for keymaps cannot be reproduced, then it’s possible I am misunderstanding something about its usage.
FWIW I have seen the same exact behavior with which-key in any prefix-map keybindings made with general.el
even without Meow (and thus, even some of Doom Emacs’s default bindings). The difference is that which-key output can be customized using the menu text description as described above.
Both
define-key
andkeymap-set
accept the following forms as definitions (quoting from the docstring ofkeymap-set
):For whatever reason, I can't find this documented in the manual even in the description for
keymap-set
, otherwise I would link there. The best resource I found is Simple Menu Items (GNU Emacs Lisp Reference Manual).Although the docstring as quoted above says the
STRING
in(STRING . DEFN)
is "used only if the containing keymap has been created with a menu name",which-key
specifically supports and encourages the use ofSTRING
as the overriding description for a definition.Meow's custom
which-key
-like leader popup could leverage(STRING . DEFN)
to replace the+prefix
labels. FWIW, general.el also causes these+prefix
labels to appear everywhere because it doesn't handlewhich-key
properly.I think
which-key
does that here in alet*
binding:https://github.com/justbur/emacs-which-key/blob/4d20bc852545a2e602f59084a630f888542052b1/which-key.el#L1823-L1838
Excerpt: