Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
linrongbin16 committed Nov 14, 2023
1 parent 2495eaa commit 4b4b4a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lua/lsp-progress.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ local function spin(client_id, token)
event.emit()
end

--- @param progress table<any, any>
--- @param client_id integer
local function update_progress(progress, client_id)
--- @param progress table<any, any>
local function update_progress(client_id, progress)
local nvim_lsp_client = vim.lsp.get_client_by_id(client_id)
local client_name = nvim_lsp_client and nvim_lsp_client.name or "unknown"

Expand Down Expand Up @@ -254,7 +254,7 @@ end
--- @param msg table<string, any>
--- @param ctx table<string, any>
local function method_handler(err, msg, ctx)
update_progress(msg, ctx.client_id)
update_progress(ctx.client_id, msg)

Check warning on line 257 in lua/lsp-progress.lua

View check run for this annotation

Codecov / codecov/patch

lua/lsp-progress.lua#L257

Added line #L257 was not covered by tests
end

local function event_handler()
Expand All @@ -272,7 +272,7 @@ local function event_handler()
and progress.token ~= nil
and type(progress.value) == "table"

Check warning on line 273 in lua/lsp-progress.lua

View check run for this annotation

Codecov / codecov/patch

lua/lsp-progress.lua#L271-L273

Added lines #L271 - L273 were not covered by tests
then
update_progress(progress, client.id)
update_progress(client.id, progress)

Check warning on line 275 in lua/lsp-progress.lua

View check run for this annotation

Codecov / codecov/patch

lua/lsp-progress.lua#L275

Added line #L275 was not covered by tests
end
end
end
Expand Down

0 comments on commit 4b4b4a1

Please sign in to comment.