Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HUD opened after client initialisatoin closes immidiately #641

Open
Olical opened this issue Jan 15, 2025 · 9 comments
Open

HUD opened after client initialisatoin closes immidiately #641

Olical opened this issue Jan 15, 2025 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@Olical
Copy link
Owner

Olical commented Jan 15, 2025

So when I open up a Clojure file it opens the HUD to show me the connection going through to the REPL.

This used to stay open until I moved my cursor but now it's closing immediately. I've narrowed it down to the CursorMoved event firing after Neovim opens and the HUD / log is created for the first time. This event is set up to passively close the HUD by calling log.close-hud-passive.

This didn't work like this in the past so I suspect the event has changed behaviour between Neovim versions.

@Olical Olical added the bug Something isn't working label Jan 15, 2025
@saccarosium
Copy link
Contributor

Interesting looking at neovim core doesn't appear, at least by a superficial search through commits, that CursorMoved was changed. The latest commit that mention that event is from 2023.

@Olical
Copy link
Owner Author

Olical commented Jan 15, 2025

Hm, even weirder. Then maybe another plugin or some other part of my Neovim configuration is now triggering it earlier than expected.

@Olical
Copy link
Owner Author

Olical commented Jan 15, 2025

Tried Neovim 0.9 and 0.10, same issue.

@saccarosium
Copy link
Contributor

I cannot reproduce this. If I open a file, either python or clojure, the HUD stay open until I move the cursor.

@Olical
Copy link
Owner Author

Olical commented Jan 15, 2025

Oh! I'm not sure what's worse. I wonder if this could even be somehow related to #639.

@Olical
Copy link
Owner Author

Olical commented Jan 15, 2025

Seems like a timing related thing because I think I only see this on my laptop, not my desktop but I'll confirm that tomorrow.

@Olical
Copy link
Owner Author

Olical commented Jan 15, 2025

Maybe https://neovim.io/doc/user/autocmd.html#autocmd-disable will be helpful here, so while the log gets set up we can't trigger the passive close from cursor moved.

@Olical
Copy link
Owner Author

Olical commented Jan 20, 2025

Checked this out on my full PC (which is pretty darn fast) and I see the HUD pop up then vanish, so seems like it's consistent on both of my machines! There's definitely some new behaviour in Neovim or Conjure that is causing a cursormoved event when it wasn't in the past. How odd!

@Olical Olical self-assigned this Feb 15, 2025
@Olical
Copy link
Owner Author

Olical commented Feb 15, 2025

I've raised the minimum lifetime for the HUD to 250ms by default. This should mitigate this issue. I do think something must have changed in Neovim around 0.8-0.10 though, I don't think I had issues with CursorMoved firing this much in the past.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants