mirror of
https://github.com/neovim/neovim.git
synced 2025-11-15 06:49:01 +00:00
Merge pull request #14729 from mjlbach/feat/diagnostic_quickfix_cleanup
feat(lsp): remove line from diagnostic quickfix
This commit is contained in:
@@ -1217,13 +1217,11 @@ function M.set_loclist(opts)
|
|||||||
local row = pos.line
|
local row = pos.line
|
||||||
local col = util.character_offset(bufnr, row, pos.character)
|
local col = util.character_offset(bufnr, row, pos.character)
|
||||||
|
|
||||||
local line = (api.nvim_buf_get_lines(bufnr, row, row + 1, false) or {""})[1]
|
|
||||||
|
|
||||||
table.insert(items, {
|
table.insert(items, {
|
||||||
bufnr = bufnr,
|
bufnr = bufnr,
|
||||||
lnum = row + 1,
|
lnum = row + 1,
|
||||||
col = col + 1,
|
col = col + 1,
|
||||||
text = line .. " | " .. diag.message,
|
text = diag.message,
|
||||||
type = loclist_type_map[diag.severity or DiagnosticSeverity.Error] or 'E',
|
type = loclist_type_map[diag.severity or DiagnosticSeverity.Error] or 'E',
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user