which-key.nvim
which-key.nvim copied to clipboard
Pop-up doesn't appear when pressing <leader>
As the title says. It could be an incompatibility with a recent change in neovim nightly, because it works fine in 0.7.2, but broken in nightly.
When pressing <leader> I get the usual text in the command bar <bs> go up one level <esc> close, but no window with the root keybindings. If I then press another key, I will get the which-key pop-up as usual for that submenu.
I have the same issue on Neovim nightly (NVIM v0.8.0-dev-).
Like you said, whichkey only shows the "help" information if enabled <bs> go up one level <esc> close and also the key you pressed, <leader> for me.
same issue on NVIM v0.8.0-dev-
I am having this problem on 0.7.2 official. One WhichKey is run from inside the editor everything works fine, but I can't run WhichKey inside my config anywhere.
Same problem here.. writing it manually shows the popup correctly but it doesn't do it automatically.
For now, I use:
map("n", "<Leader>", ":WhichKey\r<leader>", opts)
not perfect but it works.
set nvim timeout = true and set timeoutlen will fix popup problem, it works for me
I am also facing this issue with nvim 0.8.0
did you check with :checkhealth which_key?
@folke these are the only warning i get

this config works
use {
"folke/which-key.nvim",
config = function()
vim.cmd([[
set timeout
set timeoutlen
]])
require("which-key").setup()
end
}
~I don't know why, but my opts included prefix = "<leader>". Removing that line fixed it for me, so now pressing the leader alone pops up the available mappings.~
EDIT: Hmm, but it's breaking other things, so maybe this isn't the solution...
EDIT2: Maybe you can learn from my stupidity: I had a "blank" mapping, like mappings[""] = "Highlight Capture", which would mean it gets triggered with just the leader.
Doing checkhealth which_key did show this:
6 ▏ - WARNING: conflicting keymap exists for mode **"n"**, lhs: **"<leader>"**
So I should've paid attention to that, or known to interpret it properly. Removing that mapping (it was a typo to begin with) made it work again.
@ckoehler the new example has the fix for this issue!
-- Lua
use {
"folke/which-key.nvim",
config = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
require("which-key").setup {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
end
}