[X] I have updated the plugin to the latest version before submitting this issue
[X] I have searched the existing issues of which-key.nvim
[X] I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
0.10.2
Operating system/version
Fedora release 41
Describe the bug
The desc parameter in wk.Spec accepts either a string or fun():string. However, the behavior to hide mapping when desc = which_key_ignore only works when desc is of type string.
When desc is of type fun():string, the mapping still shows and the label becomes "which_key_ignore".
I think this is related to #880
Steps To Reproduce
In my .config/nvim/lua/config.autocmds.lua, I have the following code to set up compilation of cpp file
Did you check docs and existing issues?
Neovim version (nvim -v)
0.10.2
Operating system/version
Fedora release 41
Describe the bug
The
desc
parameter inwk.Spec
accepts either astring
orfun():string
. However, the behavior to hide mapping whendesc = which_key_ignore
only works whendesc
is of typestring
.When
desc
is of typefun():string
, the mapping still shows and the label becomes "which_key_ignore".I think this is related to #880
Steps To Reproduce
In my .config/nvim/lua/config.autocmds.lua, I have the following code to set up compilation of cpp file
In my .config/nvim/lua/plugins/which-key.lua file, I have the following code
Then, open any file that is not a .cpp file. Then click "" followed by "r". Instead of hiding the mapping, it shows "which_key_ignore" instead.
Expected Behavior
The mapping should be dynamically hidden / shown based on whether the
desc
function returns "which_key_ignore" / some other string.Health
No response
Log
No response
Repro
No response