fix(lsp): fix workspace diagnostic request to follow spec (#34674)

* fix(lsp): fix workspace diagnostic request to follow spec

* refactor(lsp): add type annotation
This commit is contained in:
Zie Mcdowell
2025-06-27 20:17:41 +01:00
committed by GitHub
parent f2988e05db
commit 4ee2e365a5

View File

@@ -443,16 +443,16 @@ end
--- Returns the result IDs from the reports provided by the given client.
--- @return lsp.PreviousResultId[]
local function previous_result_ids(client_id)
local results = {}
local results = {} ---@type lsp.PreviousResultId[]
for bufnr, state in pairs(bufstates) do
if state.pull_kind ~= 'disabled' then
for buf_client_id, result_id in pairs(state.client_result_id) do
if buf_client_id == client_id then
table.insert(results, {
textDocument = util.make_text_document_params(bufnr),
previousResultId = result_id,
})
results[#results + 1] = {
uri = vim.uri_from_bufnr(bufnr),
value = result_id,
}
break
end
end