From 2198c07124bef27ef81335be511c8abfd75db933 Mon Sep 17 00:00:00 2001 From: LimbicSys <30319215+LimbicSys@users.noreply.github.com> Date: Sat, 20 Jan 2024 17:26:30 +0800 Subject: [PATCH] fix: show better diagnostic message (#1383) * chore(doc): auto generate docs * fix: add a white space betweent diagnostic source and code --------- Co-authored-by: github-actions[bot] --- doc/lspsaga.nvim.txt | 2 +- lua/lspsaga/diagnostic/show.lua | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/lspsaga.nvim.txt b/doc/lspsaga.nvim.txt index 86f3051f0..d03dee68b 100644 --- a/doc/lspsaga.nvim.txt +++ b/doc/lspsaga.nvim.txt @@ -1,4 +1,4 @@ -*lspsaga.nvim.txt* For Nvim 0.8.0 Last change: 2024 January 05 +*lspsaga.nvim.txt* For Nvim 0.8.0 Last change: 2024 January 20 ============================================================================== Table of Contents *lspsaga.nvim-table-of-contents* diff --git a/lua/lspsaga/diagnostic/show.lua b/lua/lspsaga/diagnostic/show.lua index ed1fe5f02..bcc1606cb 100644 --- a/lua/lspsaga/diagnostic/show.lua +++ b/lua/lspsaga/diagnostic/show.lua @@ -84,7 +84,7 @@ function sd:layout_normal() ['number'] = false, ['relativenumber'] = false, ['stc'] = '', - ['wrap'] = diag_conf.wrap_long_lines + ['wrap'] = diag_conf.wrap_long_lines, }) :wininfo() api.nvim_win_set_height(self.winid, 10) @@ -152,7 +152,7 @@ function sd:layout_float(opt) :winopt({ ['conceallevel'] = 2, ['concealcursor'] = 'niv', - ['wrap'] = diag_conf.wrap_long_lines + ['wrap'] = diag_conf.wrap_long_lines, }) :winhl('DiagnosticShowNormal', 'DiagnosticShowBorder') :wininfo() @@ -225,6 +225,7 @@ local function msg_fmt(entry) .. entry.bufnr .. ' ' .. (entry.source and entry.source or '') + .. ' ' .. (entry.code and entry.code or '') end