[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)
v0.10.0 commit 27fb629
Operating system/version
WSL2 Ubuntu 22.04.4 LTS (on Windows 11, Version 10.0.22631 Build 22631)
Describe the bug
Calling require("which-key") causes the dot repeat action to not work. For example, using cw to change a word, then using . over another word puts the characters in the wrong places and sometimes leaves neovim in insert mode.
I use lazy.nvim, and this bug happens with the following which-key configurations:
However, this bug does not happen with the following which-key configurations:
{ "folke/which-key.nvim" }
{ "folke/which-key.nvim", config = function() end }
Steps To Reproduce
Use the minimal init.lua
Insert the following text
hey hey
Cursor over second 'e', use ciw, now, <esc>.
hey now
Put cursor over first 'e', use .
hwey now
Cursor is still in insert mode.
Expected Behavior
Following the above example, I would expect the . action to change the first hey into now.
Repro
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
{ "folke/which-key.nvim", opts = {} },
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
Did you check docs and existing issues?
Neovim version (nvim -v)
v0.10.0 commit 27fb629
Operating system/version
WSL2 Ubuntu 22.04.4 LTS (on Windows 11, Version 10.0.22631 Build 22631)
Describe the bug
Calling
require("which-key")
causes the dot repeat action to not work. For example, usingcw
to change a word, then using.
over another word puts the characters in the wrong places and sometimes leaves neovim in insert mode.I use lazy.nvim, and this bug happens with the following which-key configurations:
However, this bug does not happen with the following which-key configurations:
Steps To Reproduce
init.lua
ciw
,now
,<esc>
..
Expected Behavior
Following the above example, I would expect the
.
action to change the firsthey
intonow
.Repro