fix(lsp): actually send diagnostic-tags back to the server

Fixes #27318
This commit is contained in:
Lewis Russell 2024-03-06 10:43:43 +00:00 committed by Lewis Russell
parent 8149bd089e
commit 3e016fa8d4

View File

@ -136,7 +136,7 @@ end
--- @param diagnostic vim.Diagnostic --- @param diagnostic vim.Diagnostic
--- @return lsp.DiagnosticTag[]? --- @return lsp.DiagnosticTag[]?
local function tags_vim_to_vim(diagnostic) local function tags_vim_to_lsp(diagnostic)
if not diagnostic._tags then if not diagnostic._tags then
return return
end end
@ -173,7 +173,7 @@ local function diagnostic_vim_to_lsp(diagnostics)
message = diagnostic.message, message = diagnostic.message,
source = diagnostic.source, source = diagnostic.source,
code = diagnostic.code, code = diagnostic.code,
tags = tags_vim_to_vim(diagnostics), tags = tags_vim_to_lsp(diagnostic),
}, diagnostic.user_data and (diagnostic.user_data.lsp or {}) or {}) }, diagnostic.user_data and (diagnostic.user_data.lsp or {}) or {})
end, diagnostics) end, diagnostics)
end end