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: Keymaps from expanded groups only show one key #795

Closed sid-6581 closed 1 month ago

sid-6581 commented 1 month ago

Did you check docs and existing issues?

Neovim version (nvim -v)

latest nightly

Operating system/version

Windows 11

Describe the bug

With the repro below, I get the following:

image

There are multiple keymaps with the same key that are from expanded groups. Instead of showing the entire key combo, it's only showing the last one.

Steps To Reproduce

Use the repro below and do :WhichKey

Expected Behavior

The entire key combo for items from expanded groups.

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", opts = {
        expand = function(_node)
          return true
        end,
    } },
  },
})