fix(lsp): announce publishDiagnostics.dataSupport (#24442)

Neovim already passed `data` element from published diagnostic to code action, but failed to announce it in client capabilities.

Here is the test that shows that `data` element is returned by `vim.lsp.diagnostic.get_line_diagnostics()`:

f56c184809/test/functional/plugin/lsp/diagnostic_spec.lua (L103-L115)

and then `get_line_diagnostics()` is used to construct the context for code action request:

f56c184809/runtime/lua/vim/lsp/buf.lua (L742)
This commit is contained in:
Bruce Weirdan 2023-07-24 19:26:17 +02:00 committed by GitHub
parent a37d568082
commit 966eb8e0b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -828,6 +828,7 @@ function protocol.make_client_capabilities()
return res
end)(),
},
dataSupport = true,
},
callHierarchy = {
dynamicRegistration = false,