From 1d9b9603bb98a0cd0fc8240cbe0a7989bf785db0 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sun, 8 Oct 2023 10:18:27 +0200 Subject: report if no diagnostics are available Since the diagnostics table is created when we open the file it will always be ~= nil. --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index ca8c5b6..e05d5ae 100644 --- a/init.lua +++ b/init.lua @@ -1319,7 +1319,7 @@ local function lspc_show_diagnostic(ls, win, line) local open_file = ls.open_files[win.file.path] local diagnostics = open_file.diagnostics - if not diagnostics then + if not diagnostics or #diagnostics == 0 then return win.file.path .. ' has no diagnostics available' end -- cgit v1.2.3