Closed yavorski closed 1 month ago
Adding screenshot
@folke I'm hijacking this, since my problem is related, but when in insert
mode and press <c-r>
which-key menu doesn't pop up for the registers. When in command line pressing <c-r>
correctly brings up the which-key menu for registers.
PS: related log with debug = true
Debug Started for v3.4.0
on_key: s
BufReadPost
BufEnter
on_key: i
ModeChanged(n:i)
not safe
on_key: <C-R>
on_key: <Esc>
on_key: <Esc>
ModeChanged(i:n)
on_key: :
ModeChanged(n:c)
on_key: <C-R>
State(start): { "Mode(c)", "Node(<C-R>)", { keys = "<C-R>", update = true, waited = 0 } }
continue: { "<C-R>", "Mode(c)" }
getchar
on_key: <Esc>
got: <Esc>
on_key: <Esc>
ModeChanged(c:n)
not safe
on_key: :
ModeChanged(n:c)
on_key: q
on_key: <CR>
ModeChanged(c:n)
not safe
@dpetka2001 I check this can't reproduce this with a minimal repro. Are you 100% you're up to date?
I am with latest, it does not open for me too.
@yavorski ok, so in a new empty file? What if you open a file and try then?
@folke Yes, I'm up to date on latest which-key
. But I just tried with a fresh LazyVim default installation and the issue does not occur. It works correctly there. Will try to find out what's wrong on my end.
Be aware, that you need to have at least one register with a value in order for it to show.
Currently wk would not attach to new buffers created with :enew
, so without a filename, since BufRead
doesn't trigger then.
Added an extra trigger on BufNew
.
Actually just tried with a clean repro it is showing a warning and after that it is poping up, but it is not working with my own config a bit sad : ) ...
Currently wk would not attach to new buffers created with
:enew
, so without a filename, sinceBufRead
doesn't trigger then.
Yes it is working with one register!
Still doesn't work on my end. Here's a screencast of LazyVim default installation without any extra configuration
Can you reproduce it with the repro template?
No, with the minimal repro it works correctly.
PS: Just to make sure, you mean this one, right?
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
},
})
Can you list the exact steps that lead to the issue?
ok, can reproduce. It's after restoring a session. That breaks it somehow. Will check
Yes, I almost always use restore session in my workflow.
But in the screencast I showed, I didn't restore session. I just used f
from dashboard to open the init.lua
file. So, maybe something with the dashboard in general?
I added some extra debugging and it seems that when entering insert mode, there's always a <80>
char pending for some reason.
Safe(false):pending "<80>"
Just pushed a fix that always ensures the mode is ready regardless of pending chars (which was causing the issue in this case)
Let me know if you'd still experience this issue.
@folke With latest update it works correctly now. Thank you very much!!
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.10.0
Operating system/version
Linux
Describe the bug
In previous version, when you were in
telescope
prompt pressing<C-r>
in insert mode would show the which-key with the contents of the registers. Now this is showing something else.Steps To Reproduce
<C-r>
to show the contents of registers, in order to select somethingExpected Behavior
Show the contents of the register as before update
Health
Log
Repro