Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress from the LSP like lua-ls stays even it's 100%. #229

Open
thenullvek opened this issue Apr 4, 2024 · 4 comments
Open

Progress from the LSP like lua-ls stays even it's 100%. #229

thenullvek opened this issue Apr 4, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@thenullvek
Copy link

Bildschirmfoto 2024-04-04 um 03 12 05

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)
@j-hui
Copy link
Owner

j-hui commented Apr 4, 2024

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.

@j-hui j-hui added the bug Something isn't working label Apr 4, 2024
@NicolasGB
Copy link

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)

@cairijun
Copy link

cairijun commented May 4, 2024

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,
})

@collinvandyck
Copy link

collinvandyck commented Jun 14, 2024

@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,
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants