-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug/feature: partial mapping (aliases) don't work as expected #583
Comments
Rather than doing `Ctrl`+Key, map `<leader>w` to `<C-w>`. Unfortunately this is affected by folke/which-key.nvim#583
You can try something like this: return {
'folke/which-key.nvim',
config = function()
local wk = require('which-key')
wk.register({
["<leader>"] = {
w = {
'<cmd>WhichKey <C-w><cr>', 'Window actions'
},
},
["gw"] = {
'<cmd>WhichKey <C-w><cr>', 'Window actions'
}
})
end
} This is not perfect, but it will work like you expect. |
Until [#583] is resolved, we need to call `:WhichKey` manually. Luckily the `<C-w>` mapping is delegated to which-key so it's not a big deal... [#583]: folke/which-key.nvim#583 Co-authored-by: Adrian Chong <[email protected]>
Thanks, calling I'll leave this issue open so that @folke can consider the underlying issue, feature request and/or adding the workaround example to the docs (etc). |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
I'd still like to find a better solution, but I don't know what that might be... |
Did you check the docs?
Is your feature request related to a problem? Please describe.
When I map
"<leader>w"
to"<C-w>"
, I don't get the which-key popup for<C-w>
when typing<leader>w
.<C-w>
manually, the "wondow" mappings are displayed.<leader>w
,C^W
is shown in the status bar, however which-key's window does not appear.Describe the solution you'd like
"Alias" mappings should be detected by which-key and displayed
Describe alternatives you've considered
Alternatively, "aliases" could be manually configured during plugin setup.
e.g.
Additional context
Extra ideas:
The text was updated successfully, but these errors were encountered: