From d846bd7e06c77dd3dbb04668c28610a6b1906d95 Mon Sep 17 00:00:00 2001 From: Michael Lingelbach Date: Sat, 5 Jun 2021 13:24:43 -0700 Subject: feat(lsp): remove line from diagnostic quickfix Adding the line takes up valuable horizontal screen space, and also precludes using the quickfixtextfunc built into neovim due to the harcoded `|`. --- runtime/lua/vim/lsp/diagnostic.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/lsp/diagnostic.lua b/runtime/lua/vim/lsp/diagnostic.lua index 6a7dc1bbb0..ebd5773d6e 100644 --- a/runtime/lua/vim/lsp/diagnostic.lua +++ b/runtime/lua/vim/lsp/diagnostic.lua @@ -1217,13 +1217,11 @@ function M.set_loclist(opts) local row = pos.line 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, { bufnr = bufnr, lnum = row + 1, col = col + 1, - text = line .. " | " .. diag.message, + text = diag.message, type = loclist_type_map[diag.severity or DiagnosticSeverity.Error] or 'E', }) end -- cgit