fix(diagnostic): don't convert diagnostic table twice

The recursive implementation of vim.lsp.diagnostic.get() applied
`diagnostic_vim_to_lsp` twice, and the second time gave wrong
results because of the unexpected format.

Fixes https://github.com/neovim/neovim/issues/15689
This commit is contained in:
Christian Clason 2021-09-17 13:35:57 +02:00
parent 3e230da90b
commit 22d146760e

View File

@ -265,7 +265,7 @@ function M.get(bufnr, client_id, predicate)
table.insert(all_diagnostics, diagnostic)
end
end)
return diagnostic_vim_to_lsp(all_diagnostics)
return all_diagnostics
end
local namespace = M.get_namespace(client_id)