mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
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:
@@ -443,16 +443,16 @@ end
|
|||||||
--- Returns the result IDs from the reports provided by the given client.
|
--- Returns the result IDs from the reports provided by the given client.
|
||||||
--- @return lsp.PreviousResultId[]
|
--- @return lsp.PreviousResultId[]
|
||||||
local function previous_result_ids(client_id)
|
local function previous_result_ids(client_id)
|
||||||
local results = {}
|
local results = {} ---@type lsp.PreviousResultId[]
|
||||||
|
|
||||||
for bufnr, state in pairs(bufstates) do
|
for bufnr, state in pairs(bufstates) do
|
||||||
if state.pull_kind ~= 'disabled' then
|
if state.pull_kind ~= 'disabled' then
|
||||||
for buf_client_id, result_id in pairs(state.client_result_id) do
|
for buf_client_id, result_id in pairs(state.client_result_id) do
|
||||||
if buf_client_id == client_id then
|
if buf_client_id == client_id then
|
||||||
table.insert(results, {
|
results[#results + 1] = {
|
||||||
textDocument = util.make_text_document_params(bufnr),
|
uri = vim.uri_from_bufnr(bufnr),
|
||||||
previousResultId = result_id,
|
value = result_id,
|
||||||
})
|
}
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user