fidget.nvim
fidget.nvim copied to clipboard
Progress from the LSP like lua-ls stays even it's 100%.
Setup: NvChad v2.5
Logs:
[INFO Do 4 Apr 03:08:56 2024] /lua/fidget.lua:48: fidget.nvim setup() complete.
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/poll.lua:134: Poller ( progress ) polling once at 7.205s
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress/lsp.lua:194: Polling messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress/lsp.lua:211: Got message from 1 (lua_ls) : {
cancellable = false,
message = "69/138",
percentage = 49,
title = "Loading workspace"
}
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress/lsp.lua:221: Processed 1 messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress.lua:227: Notifying LSP progress message from lua_ls : Loading workspace | 69/138
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/poll.lua:90: Poller ( notification ) starting at 7.206s
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/poll.lua:134: Poller ( progress ) polling once at 7.207s
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress/lsp.lua:194: Polling messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress/lsp.lua:211: Got message from 1 (lua_ls) : {
cancellable = false,
message = "69/124",
percentage = 54,
title = "Loading workspace"
}
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress/lsp.lua:221: Processed 2 messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress.lua:227: Notifying LSP progress message from lua_ls : Loading workspace | 69/124
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/poll.lua:134: Poller ( progress ) polling once at 7.268s
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress/lsp.lua:194: Polling messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress/lsp.lua:211: Got message from 1 (lua_ls) : {
message = "88/138",
percentage = 63,
title = "Loading workspace"
}
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress/lsp.lua:221: Processed 2 messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress.lua:227: Notifying LSP progress message from lua_ls : Loading workspace | 88/138
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/poll.lua:134: Poller ( progress ) polling once at 7.268s
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress/lsp.lua:194: Polling messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress/lsp.lua:211: Got message from 1 (lua_ls) : {
message = "88/124",
percentage = 70,
title = "Loading workspace"
}
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress/lsp.lua:221: Processed 2 messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress.lua:227: Notifying LSP progress message from lua_ls : Loading workspace | 88/124
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/poll.lua:134: Poller ( progress ) polling once at 7.318s
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress/lsp.lua:194: Polling messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress/lsp.lua:211: Got message from 1 (lua_ls) : {
message = "116/138",
percentage = 83,
title = "Loading workspace"
}
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress/lsp.lua:221: Processed 2 messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress.lua:227: Notifying LSP progress message from lua_ls : Loading workspace | 116/138
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/poll.lua:134: Poller ( progress ) polling once at 7.319s
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress/lsp.lua:194: Polling messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress/lsp.lua:211: Got message from 1 (lua_ls) : {
message = "116/124",
percentage = 92,
title = "Loading workspace"
}
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress/lsp.lua:221: Processed 2 messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:03 2024] /lua/fidget/progress.lua:227: Notifying LSP progress message from lua_ls : Loading workspace | 116/124
[INFO Do 4 Apr 03:09:04 2024] /lua/fidget/poll.lua:134: Poller ( progress ) polling once at 7.442s
[INFO Do 4 Apr 03:09:04 2024] /lua/fidget/progress/lsp.lua:194: Polling messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:04 2024] /lua/fidget/progress/lsp.lua:211: Got message from 1 (lua_ls) : {
message = "124/124",
percentage = 100,
title = "Loading workspace"
}
[INFO Do 4 Apr 03:09:04 2024] /lua/fidget/progress/lsp.lua:221: Processed 2 messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:04 2024] /lua/fidget/progress.lua:227: Notifying LSP progress message from lua_ls : Loading workspace | 124/124
[INFO Do 4 Apr 03:09:04 2024] /lua/fidget/poll.lua:134: Poller ( progress ) polling once at 7.443s
[INFO Do 4 Apr 03:09:04 2024] /lua/fidget/progress/lsp.lua:194: Polling messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:04 2024] /lua/fidget/progress/lsp.lua:211: Got message from 1 (lua_ls) : {
message = "138/138",
percentage = 100,
title = "Loading workspace"
}
[INFO Do 4 Apr 03:09:04 2024] /lua/fidget/progress/lsp.lua:221: Processed 1 messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:04 2024] /lua/fidget/progress.lua:227: Notifying LSP progress message from lua_ls : Loading workspace | 138/138
[INFO Do 4 Apr 03:09:04 2024] /lua/fidget/poll.lua:134: Poller ( progress ) polling once at 7.444s
[INFO Do 4 Apr 03:09:04 2024] /lua/fidget/progress/lsp.lua:194: Polling messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:04 2024] /lua/fidget/progress/lsp.lua:221: Processed 1 messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:04 2024] /lua/fidget/progress.lua:210: No LSP messages (that can be displayed)
[INFO Do 4 Apr 03:09:04 2024] /lua/fidget/poll.lua:134: Poller ( progress ) polling once at 7.454s
[INFO Do 4 Apr 03:09:04 2024] /lua/fidget/progress/lsp.lua:194: Polling messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:04 2024] /lua/fidget/progress/lsp.lua:221: Processed -0 messages from 1 (lua_ls)
[INFO Do 4 Apr 03:09:04 2024] /lua/fidget/progress.lua:210: No LSP messages (that can be displayed)
Sounds related to #201. Have you tried setting the progress.lsp.progress_ringbuf_size setting to something large, like 2048? That might fix it for you.
Hey i've got the same problem, I've tried the #201 fix, even with 10000 and it still stays (in my case it's rust-analyzer)
I try using autocmd to remove the notification, and it seems working fine so far:
vim.api.nvim_create_autocmd("LspProgress", {
pattern = "end",
callback = function(ev)
local token = ev.data.result.token
local client_id = ev.data.client_id
local client = client_id and vim.lsp.get_client_by_id(client_id)
if client and token then
require("fidget").notification.remove(client.name, token)
end
end,
})
@cairijun thanks for this! I had to modify it slightly -- the token was in params not result (neovim: 0.10.0)
vim.api.nvim_create_autocmd("LspProgress", {
pattern = "end",
callback = function(ev)
local token = ev.data.params.token
local client_id = ev.data.client_id
local client = client_id and vim.lsp.get_client_by_id(client_id)
if client and token then
require("fidget").notification.remove(client.name, token)
end
end,
})