LSP: Remove diagnostic message handling in locations_to_items

`locations_to_items` is for turning `Location[]` into items, not for
`Diagnostic[]`
This commit is contained in:
Mathias Fussenegger 2020-02-23 13:00:48 +01:00
parent 220a2b05c6
commit 38201650cd
2 changed files with 2 additions and 3 deletions

View File

@ -33,7 +33,6 @@ M['textDocument/publishDiagnostics'] = function(_, _, result)
util.buf_diagnostics_underline(bufnr, result.diagnostics)
util.buf_diagnostics_virtual_text(bufnr, result.diagnostics)
util.buf_diagnostics_signs(bufnr, result.diagnostics)
-- util.set_loclist(result.diagnostics)
vim.api.nvim_command("doautocmd User LspDiagnosticsChanged")
end

View File

@ -797,7 +797,7 @@ function M.locations_to_items(locations)
for _, d in ipairs(locations) do
local start = d.range.start
local fname = assert(vim.uri_to_fname(d.uri))
table.insert(grouped[fname], {start = start, msg= d.message })
table.insert(grouped[fname], {start = start})
end
@ -824,7 +824,7 @@ function M.locations_to_items(locations)
filename = fname,
lnum = row + 1,
col = col + 1;
text = temp.msg or line;
text = line;
})
end
end