echasnovski / mini.nvim

Library of 40+ independent Lua modules improving overall Neovim (version 0.8 and higher) experience with minimal effort
MIT License
4.84k stars 183 forks source link

Mini.notify gets stuck #647

Closed eXvimmer closed 8 months ago

eXvimmer commented 8 months ago

Contributing guidelines

Module(s)

mini.notify

Description

Hi. When I open a file (e.g., a Lua file) and try :LspStop lua_ls while the LSP is trying to index the files, the mini.notify gets stuck in the corner and I cannot close it.

Screencast from 08-01-24 02:05:21.webm

Neovim version

v0.9.4

Steps to reproduce

Try LspStop while mini.notify is showing and the LSP is indexing.

Expected behavior

Mini.notify should be gone after a specific time (1500ms in my case).

Actual behavior

It remains there.

echasnovski commented 8 months ago

Thanks for the issue!

LSP progress notifications are handled according to LSP specification, which states that work is done after there is a certain response from a server. Doing LspStop prevents processing that response thus 'mini.notify' thinks that progress is still in place. I think this is an expected behavior here.

To remove notifications, use :lua MiniNotify.clear().

Closing as not planned.

eXvimmer commented 8 months ago

Thanks for your response. I used to use fidget, and it was able to handle these cases. I think there might be some way to prevent this behavior.

echasnovski commented 8 months ago

Thanks for your response. I used to use fidget, and it was able to handle these cases. I think there might be some way to prevent this behavior.

Of course, there is a way. I am saying that the behavior itself of hiding LSP progress notifications not only after its successful end is a bit misleading and should be quite rare. If this occurs, there is something wrong and should be investigated further. If done on purpose, there is MiniNotify.clear().

eXvimmer commented 8 months ago

Thank you!