justbur / emacs-which-key

Emacs package that displays available keybindings in popup
GNU General Public License v3.0
1.73k stars 87 forks source link

yasnippet bindings have no label #337

Open vnckppl opened 2 years ago

vnckppl commented 2 years ago

Yasnippets can have a keybinding assigned to them, e.g.:

# -*- mode: snippet -*-
# name: Highlight
# expand-env: ((yas-wrap-around-region nil) (item-string ""))
# binding : C-c y h y
(...)

which-key does detect these keybindings, but does not display a label. So, for the snippet above, after pressing C-c y h, which-key would display:

y -> nil

Is it possible to have which-key pull the label from the # name: tag of a yasippet?

justbur commented 2 years ago

Hm, in principle yes, but after looking at how yasnippet works, this appears to be quite a bit of work, and I do not have much time these days...