Closed minad closed 3 years ago
You can use which-key-replacement-alist
to do this already. See the docstring of that variable.
Here's an example that will hide the binding for "C-x DEL"
(add-to-list 'which-key-replacement-alist '(("C-x DEL" . nil) . t))
This is equivalent to
(which-key-add-key-based-replacements "C-x DEL" t)
Thank you! I want to hide based on the command name and it was not clear to me how this works. But this is indeed documented and I overlooked it. The replacement mechanism is more powerful than it seemed to me. It is even possible to specify a function, which transforms the replacement!
This works:
(add-to-list 'which-key-replacement-alist '((nil . "command-name") . t))
I found some variable
(ignore-bindings '("self-insert-command" "ignore" "ignore-event" "company-ignore"))
which is used internally. But I didn't find a possibility to customize this. Is it possible to generalize this by adding a custom filter function which is always applied to the results of thewhich-key--get-bindings
function? The default function could filterself-insert-command
etc.