folke / which-key.nvim

💥 Create key bindings that stick. WhichKey helps you remember your Neovim keymaps, by showing available keybindings in a popup as you type.
Apache License 2.0
5.12k stars 163 forks source link

bug: `leader` doesn't show `whichkey` the first time #679

Closed sahashirshendu closed 1 month ago

sahashirshendu commented 1 month ago

Did you check docs and existing issues?

Neovim version (nvim -v)

0.10.0

Operating system/version

Arch Linux

Describe the bug

I'm loading WhichKey with leader key which used to flawlessly before (using lazy package manager). But after updating to v3, while leader is pressed the first time, WhichKey doesn't show. After that it shows normally. [The above anomaly isn't there if WhichKey is loaded with event VeryLazy]

Steps To Reproduce

  1. Start nvim
  2. Hit <leader.

Expected Behavior

WhichKey should open, but it doesn't (the first time).

Health

No response

Log

No response

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
    spec = {
        {
            "folke/which-key.nvim",
            -- event = "VeryLazy",
            enabled = true,
            keys = {
                { "<leader>", mode = { "n", "v" }, silent = true },
            },
            opts = {},
        },
    },
})
folke commented 1 month ago

Either group or desc is required

sahashirshendu commented 1 month ago

Either group or desc is required

@folke Sorry for the late reply, but could you please elaborate on this?