Treat window/progress messages as log messages#316
Treat window/progress messages as log messages#316gpanders wants to merge 2 commits intonatebosch:masterfrom
Conversation
|
Thanks for the PR. I'm a little torn on the best way to handle this since I don't have a good understanding of how most servers and users use progress. One thing to note here is that the I'm not sure that I think the optimal solution here would be to drop vim-lsc/autoload/lsc/server.vim Lines 340 to 342 in c67d8aa Would you be happy instead if these messages were just suppressed always, and users who are interested in them would set up their own handling? |
That is a perfectly acceptable solution as far as I'm concerned! Thank you for the elaborate response. |
These messages should only be displayed if `log_level` is set to `'Log'`.
This converts a message type by name into a log level value
These messages should only be displayed if
log_levelis set to'Log'.Back in #130 support was added for
window/progressmessages which are sent byrls. However, these messages are a bit incessant and quickly get very annoying, and as it is now there is no way to disable them. This PR treats these messages as "Log" level messages and will therefore only display them iflog_levelis set to'Log'.I don't love the hard codedEDIT: I added a new function4in here and I am open to suggestions on a better solution, but as far as I can tell the log levels aren't enumerated anywhere so hard coding is the only possible approach (thewindow/progressmessages do not have atypeparameter like thewindow/logMessagemessages do).lsc#config#messageTypeso that we can avoid using magic numbers.