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:
parent
220a2b05c6
commit
38201650cd
|
@ -33,7 +33,6 @@ M['textDocument/publishDiagnostics'] = function(_, _, result)
|
||||||
util.buf_diagnostics_underline(bufnr, result.diagnostics)
|
util.buf_diagnostics_underline(bufnr, result.diagnostics)
|
||||||
util.buf_diagnostics_virtual_text(bufnr, result.diagnostics)
|
util.buf_diagnostics_virtual_text(bufnr, result.diagnostics)
|
||||||
util.buf_diagnostics_signs(bufnr, result.diagnostics)
|
util.buf_diagnostics_signs(bufnr, result.diagnostics)
|
||||||
-- util.set_loclist(result.diagnostics)
|
|
||||||
vim.api.nvim_command("doautocmd User LspDiagnosticsChanged")
|
vim.api.nvim_command("doautocmd User LspDiagnosticsChanged")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -797,7 +797,7 @@ function M.locations_to_items(locations)
|
||||||
for _, d in ipairs(locations) do
|
for _, d in ipairs(locations) do
|
||||||
local start = d.range.start
|
local start = d.range.start
|
||||||
local fname = assert(vim.uri_to_fname(d.uri))
|
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
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -824,7 +824,7 @@ function M.locations_to_items(locations)
|
||||||
filename = fname,
|
filename = fname,
|
||||||
lnum = row + 1,
|
lnum = row + 1,
|
||||||
col = col + 1;
|
col = col + 1;
|
||||||
text = temp.msg or line;
|
text = line;
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue