We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2d5990 commit ba6b071Copy full SHA for ba6b071
1 file changed
lua/lspsaga/diagnostic/init.lua
@@ -29,8 +29,10 @@ end
29
30
local function gen_float_title(counts)
31
local t = {}
32
+ local found = 0
33
for i, v in ipairs(counts) do
34
if v > 0 then
35
+ found = found + 1
36
local hi = 'Diagnostic' .. vim.diagnostic.severity[i]
37
t[#t + 1] = { config.ui.button[1], hi }
38
t[#t + 1] = {
@@ -40,7 +42,7 @@ local function gen_float_title(counts)
40
42
t[#t + 1] = { config.ui.button[2], hi }
41
43
end
44
- return t
45
+ return found > 1 and t or nil
46
47
48
---get the line or cursor diagnostics
0 commit comments