Closed PannenetsF closed 18 hours ago
you misunderstand mappings.
When you press c
and wait, timeoutlen expires and you enter op-pending mode, so which-key will show you continuations for operator pending mode (this won't include your cit mapping).
The old which-key did this incorrectly.
not a bug
I get it now, thanks, folke.
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.10.0
Operating system/version
macOS 13.4 22F66 x86_64
Describe the bug
When using
which-key.nvim
, the preset for operators (e.g.,c
forchange
) conflicts with custom mappings. If a custom mapping (e.g.,cit
) is defined, theWhichKey
menu splits the behavior into two separate groups:c
key remains under thechange
operator group.cit
) is treated as an independent mapping, causing inconsistency.Steps To Reproduce
(run with the
repro.lua
)Trigger the following scenarios: Press c → i → t in normal mode to use the change operator. Run :WhichKey and check the group for c. Observe that c → i → t appears under the test_handler mapping instead of being grouped under the change operator.
Expected Behavior
When pressing c → i → t, nvim should exec the
_test_handler
in the config instead of the original one.Actual behavior: c → i → t is still recognized as part of the change operator preset for the inner tag. Running :WhichKey shows c → i → t as an independent mapping, associated with the test_handler function.
SO the issue is about inconsistency.
Health
Log
Repro