Open serhez opened 2 weeks ago
Can't reproduce. Does :Noice log
show something useful?
Do you still see the issue with Noice's default options?
@folke Unfortunately no, the last log is almost a month old. Which issue about the default options are you referring to?
If you cannot reproduce it with my config, I wonder what other plugin or general nvim option could be interfering with this. If I just set enabled = false
in my lazy config for noice, the issue goes away.
I just did a small test: when I'm on commit 69c6ad5c1f1c0777125d0275f9871d8609cb0521
, neovim quitting is instantaneous , when I upgrade to commit 31ec80c99ee699ea4e90248c2e87e5a669be5e93
(the next commit), I see the lag when quitting. I think this VimLeavePre
logic (disabling the plugin I assume) is taking ~1sec and slowing down the quitting process. If it helps, I'm running it on a 2021 M1 Pro MacbookPro.
EDIT: A small thing to consider if you want to try what I mention above is that, sometimes, it takes a few tries of "Update"/"Sync" in the lazy panel to upgrade/downgrade to some commit; sometimes I see the plugin as being updated but then I look into the plugin's information (hitting enter on its name in the lazy panel) and the commit listed there is the previous one I had specified in my config. This is not just a visual bug. After two/three updates/syncs, this is fixed and the plugin is updated to the newly specified commit.
Do you have any other plugin that creates autocmd for VimLeavePre
?
If you don't see anything in the logs, then I have no idea what might be happening here. Most likely some other plugin that interacts with Noice. Typically when you see a delay in closing Neovim, it means a plugin is triggering an error. Unfortunately it's not always easy to figure out what plugin and even what error.
@b0ae989c is there any way to find out which functions have been registered for a given autocmd like VimLeavePre
? I'm not well versed into the inner workings of most of the plugins I use, so I can't tell if they would be using this autocmd. Perhaps some session-related features?
@folke As I mentioned previously, this only happens after 31ec80c
. I see that you introduce a pcall
in those changes:
if Config.is_running() then
pcall(M.disable)
end
I'm not a lua guy, but if the pcall to M.disable
fails we would not get an error/log right? But still, could this be slowing the quitting process?
For what it's worth. I also started experiencing this recently. Every other time I quit neovim it takes about 1-2 seconds to exit. I see a stale screen of partial content while I am waiting for the exit to take place. I usually see the line numbers and some window borders. However, disabling noice does not resolve the issue fully for me. It does make it better, i.e. it happens less frequently. Maybe once every 5 exits. I'm trying to figure out what is going on and I am at a loss.
Did you check docs and existing issues?
Neovim version (nvim -v)
0.10
Operating system/version
MacOS 14.4.1
Describe the bug
When quitting, nvim lags for about 1-1.5s. This happens only when I enable
noice
. I've been usingnoice
for a long time and this has been happening only for a few weeks (I update my plugins regularly), hence I would expect it's due to a recent change. Perhaps it has something to do with commit31ec80c
?Steps To Reproduce
Expected Behavior
I would expect quitting neovim to take about the same time as when not using noice.
Repro