Merge branch 'dev' into gentoo
nvim: fix lsp count in statusline
This commit is contained in:
commit
d25e9a2e72
@ -109,7 +109,12 @@ local function get_lsp_diagnostics(bufnr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for k, level in pairs(levels) do
|
for k, level in pairs(levels) do
|
||||||
result[k] = vim.lsp.diagnostic.get_count(bufnr, level)
|
local count = 0
|
||||||
|
local diags = vim.diagnostic.get(bufnr, { severity = level })
|
||||||
|
for _, _ in pairs(diags) do
|
||||||
|
count = count + 1
|
||||||
|
end
|
||||||
|
result[k] = count
|
||||||
end
|
end
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
Reference in New Issue
Block a user