Open z-campbell opened 11 months ago
Hey :wave:
Those messages are shown by fidget.nvim, which recently got an update.
You can refer to its documentation for how to limit the number of LSP messages to show.
Hi there! Fidget maintainer here; I'm actually also encountering this bug myself: https://github.com/j-hui/fidget.nvim/issues/171
I've been doing some logging and I found that haskell-tools seems to be sending some "dummy" progress messages. For instance, here's are three messages I received after making a small change and writing my buffer:
[INFO Tue Nov 28 12:25:23 2023] /lua/fidget/poll.lua:113: Poller ( progress ) polling once at 38.376s
[INFO Tue Nov 28 12:25:23 2023] /lua/fidget/progress/lsp.lua:134: Polling messages from 1 ( haskell-tools.nvim )
[INFO Tue Nov 28 12:25:23 2023] /lua/fidget/progress.lua:175: Notifying LSP progress message: {
cancellable = false,
done = false,
lsp_id = 1,
lsp_name = "haskell-tools.nvim",
title = "Processing",
token = "144"
}
[INFO Tue Nov 28 12:25:23 2023] /lua/fidget/progress.lua:175: Notifying LSP progress message: {
cancellable = false,
done = false,
lsp_id = 1,
lsp_name = "haskell-tools.nvim",
token = "126"
}
[INFO Tue Nov 28 12:25:23 2023] /lua/fidget/poll.lua:113: Poller ( progress ) polling once at 38.377s
[INFO Tue Nov 28 12:25:23 2023] /lua/fidget/progress/lsp.lua:134: Polling messages from 1 ( haskell-tools.nvim )
[INFO Tue Nov 28 12:25:23 2023] /lua/fidget/progress.lua:175: Notifying LSP progress message: {
cancellable = false,
done = true,
lsp_id = 1,
lsp_name = "haskell-tools.nvim",
title = "Processing",
token = "144"
}
Note that haskell-tools completes the task with token "144"
, but doesn't follow up on the task with token "126"
. Each buffer write leads to another one of these stale tasks.
I also tested this HLS alone (i.e., configuring it without haskell-tools.nvim), and I don't get these stale messages.
Update: it also doesn't seem to happen on Neovim nightly (i.e., 0.10.0). It only happens with 0.9.4 for me.
I wasn't able to track down where that empty message was coming from (and gave up), but I added an option to Fidget that mitigates it in https://github.com/j-hui/fidget.nvim/commit/fe60ce7a979affda1d9caba08ab44af62ed6d39f
@j-hui 🤔 interesting.
It almost certainly has to be haskell-language-server
sending those messages. My guess would be that it's something to do with the default settings set by haskell-tools, and it probably needs to be fixed upstream.
I'll reopen this issue and bisect on the config on Friday.
Thanks for the fix on your end 🙏
@j-hui I have set progress.ignore_empty_message = false
in my fidget config, but I can't seem to reproduce the issue in any of my projects (I'm using NixOS and haskell-language-server version: 2.4.0.0 (GHC: 9.4.8)).
Which OS and haskell-language-server version are you using? Do you have a project I can try to reproduce this with?
I found this hls issue, which seems to be related.
Hey @mrcjkb thanks for taking a look into this, and sorry for not responding sooner. I'm on macOS with haskell-language-server version: 1.10.0.0 (GHC: 8.10.7). Maybe it's just because mine is so out of date.
I took a look at that issue and it does indeed look related, but I haven't had time this week to dig any deeper myself.
As for the project, it was basically just a bare project created using cabal init
.
No problem 😄
I'm not too sure how to approach this at the moment anyway.
Thanks for the info, it'll definitely be useful when I do get back to this.
I can confirm this.
@bwkam are you (or a plugin you're using) having any issues with it?
@bwkam are you (or a plugin you're using) having any issues with it?
I was able to reproduce OP's issue, hls keeps sending these dummy messages
@bwkam are you (or a plugin you're using) having any issues with it?
I was able to reproduce OP's issue, hls keeps sending these dummy messages
I understand that. :smile: I was asking if you are having issues with it, or if https://github.com/j-hui/fidget.nvim/commit/fe60ce7a979affda1d9caba08ab44af62ed6d39f fixed it for you? (if there aren't any issues, this isn't very high priority right now).
I don't bandwidth to dig into this just now, but for archaeological purposes: @bwkam can you please include the versions of HLS, Neovim, haskell-tools.nvim, and fidget.nvim you're using? Thanks!
Neovim: 0.9.4 haskell-tools.nvim: f6a12216f33ca234586e61e9153b6b3244bfa801 HLS: 2.4.0.0 fidget.nvim: 2023-11-20
@bwkam are you (or a plugin you're using) having any issues with it?
I was able to reproduce OP's issue, hls keeps sending these dummy messages
I understand that. 😄 I was asking if you are having issues with it, or if j-hui/fidget.nvim@fe60ce7 fixed it for you? (if there aren't any issues, this isn't very high priority right now).
They don't annoyingly stack on top of each other like before, so I'm fine with that.
Hello there! I was having the same issue and managed to resolve it with the ignore_empty_message = true
setting in fidget.nvim
. This was really bugging me so I'm happy that it's finally resolved. Thank you!
Neovim version (nvim -v)
v0.9.2
Operating system/version
Windows 11
Output of
:checkhealth haskell-tools
OK
How to reproduce the issue
Editing any Haskell file triggers a cascade of "In progress...WARN" log entries in the bottom right hand corner of the nvim window. Nothing appears broken but its inconvenient.
Expected behaviour
I expect it not to show this or to be able to hide it.
Actual behaviour
see above
Log files
No response
The minimal config used to reproduce this issue.
{ 'mrcjkb/haskell-tools.nvim', version = '^3', -- Recommended ft = { 'haskell', 'lhaskell', 'cabal', 'cabalproject' }, },