Skip to content

Commit

Permalink
fix(lsp): dont show lsp progress for lsp clients that died. Fixes #207
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 8, 2022
1 parent 48003c5 commit 6afc974
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/noice/lsp/progress.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,16 @@ function M.progress(_, msg, info)

local message = M._progress[id]
if not message then
local client = vim.lsp.get_active_clients({ id = info.client_id })[1]
-- should not happen, but it does for some reason
if not client then
return
end
message = Message("lsp", "progress")
message.opts.progress = {
client_id = info.client_id,
---@type string
client = vim.lsp.get_active_clients({ id = info.client_id })[1].name,
client = client and client.name or ("lsp-" .. info.client_id),
}
-- message.once = true
M._progress[id] = message
Expand Down

0 comments on commit 6afc974

Please sign in to comment.