bug: entering Select mode on mouse
Did you check docs and existing issues?
- [x] I have read all the which-key.nvim docs
- [x] I have updated the plugin to the latest version before submitting this issue
- [x] I have searched the existing issues of which-key.nvim
- [x] I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
NVIM v0.11.4 Build type: RelWithDebInfo LuaJIT 2.1.1760617492 Run "nvim -V1 -v" for more info
Operating system/version
Arch Linux
Describe the bug
which key appears for a few seconds using the mouse select
When selecting text using the mouse, the key appears for a few milliseconds and it is very distracting. Compared to visual mode, it is more useful but not with the mouse.
Preview Issues
Steps To Reproduce
- Use this minimal config:
require("which-key").setup({
triggers = {
{ "<auto>", mode = { "n", "v" } },
},
})
-
Select text with your mouse (entering Select mode).
-
Notice which-key popup appears unexpectedly.
Expected Behavior
Which-key should not trigger in Select mode, but still trigger in Normal and Visual modes.
Health
==============================================================================
which-key: 5 ⚠️
- ✅ 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 ~
- ✅ OK |mini.icons| is 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`, <<C-W>> overlaps with <<C-W><C-D>>, <<C-W>d>:
- <<C-W>>: Buffer close
- <<C-W><C-D>>: Show diagnostics under the cursor
- <<C-W>d>: Show diagnostics under the cursor
- ⚠️ WARNING In mode `n`, <<Space>s> overlaps with <<Space>sh>, <<Space>ss>, <<Space>sv>, <<Space>sS>, <<Space>sx>, <<Space>se>:
- <<Space>s>: Format buffer
- <<Space>ss>: LSP Symbols
- <<Space>sS>: LSP Workspace Symbols
- ⚠️ WARNING In mode `n`, <gr> overlaps with <grt>, <grn>, <gra>, <gri>, <grr>:
- <gr>: References
- <grt>: vim.lsp.buf.type_definition()
- <grn>: vim.lsp.buf.rename()
- <gra>: vim.lsp.buf.code_action()
- <gri>: vim.lsp.buf.implementation()
- <grr>: vim.lsp.buf.references()
- ⚠️ WARNING In mode `n`, <gb> overlaps with <gbc>:
- <gb>: Comment toggle blockwise
- <gbc>: Comment toggle current block
- ⚠️ WARNING In mode `n`, <gc> overlaps with <gcA>, <gcO>, <gco>, <gcc>:
- <gc>: Comment toggle linewise
- <gcA>: Comment insert end of line
- <gcO>: Comment insert above
- <gco>: Comment insert below
- <gcc>: Comment toggle current 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
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
},
})
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Still an issue