mirror of
https://github.com/neovim/neovim.git
synced 2026-08-31 03:13:48 +00:00
fix(diagnostics)!: restore is_pull namespace argument #38698
Problem: The current LSP diagnostic implementation can't differ between a pull diagnostic with no identifier and a set of diagnostics provided via push diagnostics. "Anonymous pull providers" are expected by the protocol https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnosticOptions , depending on how the capability was registered: - Dynamic registrations have an identifier. - Static registrations will not. Solution: Restore the `is_pull` argument removed in https://github.com/neovim/neovim/pull/37938, keeping the identifier of pull diagnostic collections.
This commit is contained in:
@@ -1358,7 +1358,7 @@ function M.code_action(opts)
|
||||
local lnum = api.nvim_win_get_cursor(0)[1] - 1
|
||||
|
||||
client:_provider_foreach('textDocument/diagnostic', function(cap)
|
||||
local ns_pull = lsp.diagnostic.get_namespace(client.id, cap.identifier)
|
||||
local ns_pull = lsp.diagnostic.get_namespace(client.id, true, cap.identifier)
|
||||
vim.list_extend(
|
||||
diagnostics,
|
||||
vim.diagnostic.get(bufnr, { namespace = ns_pull, lnum = lnum })
|
||||
|
||||
Reference in New Issue
Block a user