You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have updated the plugin to the latest version before submitting this issue
I have searched the existing issues of which-key.nvim
I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
v0.10.0
Operating system/version
Ubuntu 22.04
Describe the bug
When using which-key with a plugin that display its desc as <Plug>(function name), the default config uses a regex <Plug>%(?(.*)%)? to match the (optional) brackets, but because the wildcard is greedy, the right bracket is captured. This results in the right bracket being displayed as though it were part of the description.
Steps To Reproduce
Use WhichKey along with a plugin that uses the <Plug>(function name) format for keymap descriptions, such as mg979/vim-visual-multi.
Open neovim and run :WhichKey.
Expected Behavior
Expected: The keymaps have descriptions such as VM-Find-Under.
Actual: The keymaps have descriptions such as VM-Find-Under).
Health
which-key: require("which-key.health").check()
- OK Most of these checks are for informational purposes only.
WARNINGS should be treated as a warning, and don't necessarily indicate a problem with your config.
Please |DON't| report these warnings as an issue.
Checking your config ~
- WARNING |mini.icons| is not installed
- WARNING |nvim-web-devicons| is not installed
- WARNING Keymap icon support will be limited.
Checking for issues with your mappings ~
- OK No issues reported
checking for overlapping keymaps ~
- WARNING In mode `n`, <gc> overlaps with <gcc>:
- <gc>: Toggle comment
- <gcc>: Toggle comment line
- OK Overlapping keymaps are only reported for informational purposes.
This doesn't necessarily mean there is a problem with your config.
Checking for duplicate mappings ~
- OK No duplicate mappings found
Log
Debug Started for v3.13.2
{
branch = "main",
commit = "bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0"
}
new Mode(n:1)
Trigger(add) Mode(n:1) ` ' " g` g' z= \ <C-W> ] [ g z
on_key: :
ModeChanged(n:c)
new Mode(c:1)
Safe(true)
Trigger(add) Mode(c:1) <C-R>
on_key: W
on_key: h
on_key: i
on_key: c
on_key: h
on_key: K
on_key: e
on_key: y
on_key: <CR>
ModeChanged(c:n)
Unsafe(command-mode)
suspend: Mode(n:1)
Trigger(del) Mode(n:1) <C-W> ] [ ` z ' " g` g' z= g \
State(start): Mode(n:0) Node() { delay = 0, keys = "", mode = "n", waited = 1000 }
update Mode(n:1)
continue: Mode(n:1)
getchar
Trigger(add) Mode(n:1) ` ' " g` g' z= \ <C-W> ] [ g z
on_key: :
got: :
suspend: Mode(n:1)
Trigger(del) Mode(n:1) <C-W> ] [ ` z ' " g` g' z= g \
feedkeys: Mode(n:1) :
on_key: :
ModeChanged(n:c)
Safe(true)
Trigger(add) Mode(n:1) ` ' " g` g' z= \ <C-W> ] [ g z
on_key: q
on_key: a
on_key: <CR>
ModeChanged(c:n)
Unsafe(command-mode)
suspend: Mode(n:1)
Trigger(del) Mode(n:1) <C-W> ] [ ` z ' " g` g' z= g \
Trigger(add) Mode(n:1) ` ' " g` g' z= \ <C-W> ] [ g z
Did you check docs and existing issues?
Neovim version (nvim -v)
v0.10.0
Operating system/version
Ubuntu 22.04
Describe the bug
When using which-key with a plugin that display its desc as
<Plug>(function name)
, the default config uses a regex<Plug>%(?(.*)%)?
to match the (optional) brackets, but because the wildcard is greedy, the right bracket is captured. This results in the right bracket being displayed as though it were part of the description.Steps To Reproduce
<Plug>(function name)
format for keymap descriptions, such as mg979/vim-visual-multi.:WhichKey
.Expected Behavior
Expected: The keymaps have descriptions such as
VM-Find-Under
.Actual: The keymaps have descriptions such as
VM-Find-Under)
.Health
Log
Repro
The text was updated successfully, but these errors were encountered: