Skip to content

Conversation

@zyriab
Copy link

@zyriab zyriab commented Feb 9, 2024

When I dismiss the "LSP loading" message, I have an infinite stream of "No matching notification found to replace" spamming me.
The problem was that the spinner was trying to replace the notification that I just dismissed, the solution was to set the self.notification to nil when closing the notification(s).

The next problem that arose was due to self.window having the same problem and triggering an error, the solution was to set it to nil as well, one particular call (line 208) sometimes was called before nvim-notify had the time to set self.window to nil, so I wrapped it in a pcall to suppress the error.

Lastly, it's a hack I've seen in other plugins but options.notify expects a string as first parameter (msg), passing an empty string causes the message to flicker when the spinner animates so it needs to stay nil.

My solution was topcall spinner_start (line 325).

I tried to change as little code as possible and this was the only way I've found to solve that bug.

This would fix #13

@zyriab
Copy link
Author

zyriab commented Feb 13, 2024

I got some errors because something is trying to access a nil value from time to time. I'll convert this PR to draft until this is fixed :)

@zyriab zyriab marked this pull request as draft February 13, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant