Coder Social home page Coder Social logo

bug: lag when quitting nvim about noice.nvim HOT 9 OPEN

serhez avatar serhez commented on August 25, 2024
bug: lag when quitting nvim

from noice.nvim.

Comments (9)

folke avatar folke commented on August 25, 2024

Can't reproduce. Does :Noice log show something useful?

Do you still see the issue with Noice's default options?

from noice.nvim.

serhez avatar serhez commented on August 25, 2024

@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.

from noice.nvim.

serhez avatar serhez commented on August 25, 2024

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.

from noice.nvim.

b0ae989c avatar b0ae989c commented on August 25, 2024

Do you have any other plugin that creates autocmd for VimLeavePre?

from noice.nvim.

folke avatar folke commented on August 25, 2024

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.

from noice.nvim.

serhez avatar serhez commented on August 25, 2024

@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?

from noice.nvim.

telbizov avatar telbizov commented on August 25, 2024

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.

from noice.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.