This commit is contained in:
Christoph J. Scherr 2025-07-31 18:09:55 +02:00
parent 46afdaeecf
commit be782e9048
Signed by: PlexSheep
GPG key ID: 9EB784BB202BB7BB

View file

@ -497,7 +497,7 @@ return {
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
}, },
opts = function() config = function()
-- fancy display function for folds (stolen from nvim-ufo readme) -- fancy display function for folds (stolen from nvim-ufo readme)
local handler = function(virtText, lnum, endLnum, width, truncate) local handler = function(virtText, lnum, endLnum, width, truncate)
local newVirtText = {} local newVirtText = {}
@ -545,8 +545,7 @@ return {
local label = {} local label = {}
for severity, icon in pairs(icons) do for severity, icon in pairs(icons) do
local n = #vim.diagnostic.get(props.buf, local n = #vim.diagnostic.get(props.buf, { severity = vim.diagnostic.severity[string.upper(severity)] })
{ severity = vim.diagnostic.severity[string.upper(severity)] })
if n > 0 then if n > 0 then
table.insert(label, { icon .. ' ' .. n .. ' ', group = 'DiagnosticSign' .. severity }) table.insert(label, { icon .. ' ' .. n .. ' ', group = 'DiagnosticSign' .. severity })
end end