From 4ee2e365a583e26468e7ea820f5416a980515504 Mon Sep 17 00:00:00 2001 From: Zie Mcdowell Date: Fri, 27 Jun 2025 20:17:41 +0100 Subject: [PATCH] fix(lsp): fix workspace diagnostic request to follow spec (#34674) * fix(lsp): fix workspace diagnostic request to follow spec * refactor(lsp): add type annotation --- runtime/lua/vim/lsp/diagnostic.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/runtime/lua/vim/lsp/diagnostic.lua b/runtime/lua/vim/lsp/diagnostic.lua index 661495ecb9..97d4dce19d 100644 --- a/runtime/lua/vim/lsp/diagnostic.lua +++ b/runtime/lua/vim/lsp/diagnostic.lua @@ -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