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
Is your feature request related to a problem? Please describe.
The :WhichKey command shows the keymaps for the provided mode parameter, or for normal mode if none is specified.
This means that running the command from other modes (e.g., insert or visual) will not show the proper keymaps and we need to provide the mode explicitly, which is a bit more cumbersome, especially if the :WhichKey command is bound to a keymap.
Describe the solution you'd like
The :WhichKey command should display keymaps for the current mode if the mode parameter is not specified.
Proposed fix: change config.lua, line 313 from mode = "n" to mode = vim.api.nvim_get_mode().mode.
Describe alternatives you've considered
It's possible to configure mode-specific keymaps that run :WhichKey with the appropriate parameter. e.g., instead of:
However, that doesn't work because entering a command from different modes requires different prefixes (: from normal, <C-o> from insert, need to remove the range prefix in visual mode, etc.).
These solutions are unnecessarily complex.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Did you check the docs?
Is your feature request related to a problem? Please describe.
The
:WhichKey
command shows the keymaps for the providedmode
parameter, or for normal mode if none is specified.This means that running the command from other modes (e.g., insert or visual) will not show the proper keymaps and we need to provide the mode explicitly, which is a bit more cumbersome, especially if the
:WhichKey
command is bound to a keymap.Describe the solution you'd like
The
:WhichKey
command should display keymaps for the current mode if the mode parameter is not specified.Proposed fix: change
config.lua, line 313
frommode = "n"
tomode = vim.api.nvim_get_mode().mode
.Describe alternatives you've considered
It's possible to configure mode-specific keymaps that run
:WhichKey
with the appropriate parameter. e.g., instead of:something along the lines of:
I've also thought about using a generic mapping similar to:
However, that doesn't work because entering a command from different modes requires different prefixes (
:
from normal,<C-o>
from insert, need to remove the range prefix in visual mode, etc.).These solutions are unnecessarily complex.
Additional context
No response
The text was updated successfully, but these errors were encountered: