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.07k stars 162 forks source link

bug: `vap` and `vip` triggers which-key even when typed within the delay #729

Closed WieeRd closed 1 month ago

WieeRd commented 1 month ago

Did you check docs and existing issues?

Neovim version (nvim -v)

NVIM v0.10.0

Operating system/version

Arch Linux

Describe the bug

If there is no further input after entering char-wise visual mode, which-key window opens. But if the user immediately expands the selection within the delay using motions/textobjects, it does not.

This is a great default behavior, and it seems to apply to all motions and textobjects such as vj, vw, vaw, vis, and even the mappings from other plugins. However, I found 2 exceptions to this: vap and vip.

Steps To Reproduce

Typing vap or vip in quick succession within the delay still opens which-key. Typing viw, vas etc. in quick succession does not trigger which-key.

All of them correctly opens which-key and closes it after typing the final key, if typed slowly.

Expected Behavior

I don't think ap and ip in particular were meant to be exceptions.

Health

which-key: require("which-key.health").check()

- OK Most of these checks are for informational purposes only.
  WARNINGS should be treated as a warning, and don't necessarily indicate a problem with your config.
  Please |DON't| report these warnings as an issue.

Checking your config ~
- WARNING |mini.icons| is not installed
- OK |nvim-web-devicons| is installed

Checking for issues with your mappings ~
- OK No issues reported

checking for overlapping keymaps ~
- WARNING In mode `n`, <gc> overlaps with <gcc>:
  - <gc>: Toggle comment
  - <gcc>: Toggle comment line
- OK Overlapping keymaps are only reported for informational purposes.
  This doesn't necessarily mean there is a problem with your config.

Checking for duplicate mappings ~
- OK No duplicate mappings found

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 = {} },
    -- add any other plugins here
  },
})
WieeRd commented 1 month ago

Blazingly Fast (Adjective)

Like Folke; Reminding of Folke.
A phrase created in attempt to describe the amount of work Folke gets done per day.