which-key.nvim
which-key.nvim copied to clipboard
can't remap 'z=' to open a which-key menu
I'm currently trying to map the which-key menu that opens when you press z= to another key combination. If I try to remap it by mapping another keycombination to trigger z= then it'll open the default z= window and not the which-key menu. Is there a way to remap only the which-key z= menu?
Nevermind, I just found the correct way to do it. For anyone using mapx - it looks like the following:
local m = require("mapx").setup({ global = true, whichkey = true })
m.nmap("<F6>s", "z=", "Spell: display suggestions")
Had the same issue, but wasn't using mapx. This worked for me:
vim.keymap.set('n',
'<leader>zz',
'<cmd>WhichKey<cr>z=',
{ noremap = true, desc = 'Open Spell Suggest Picker (z= alias)' })
I was also struggling with this and based on your solution I adapted it to the way the plugin does the Mappings
local wk = require("which-key")
wk.add({
{
"zz",
"<cmd>WhichKey<cr>z=",
noremap = true,
desc = "Spelling Suggest (z= alias)",
icon = { icon = "î¾³ ", color = "red" },
},
})