Compare commits

..

2 Commits

Author SHA1 Message Date
David JULIEN d25e9a2e72
Merge branch 'dev' into gentoo
nvim: fix lsp count in statusline
2021-12-12 23:37:02 +01:00
David JULIEN 7a0030b064 [nvim] fix: lsp count in statusline
vim.lsp.diagnostic.get_count() got deprecated
2021-12-12 23:35:54 +01:00
1 changed files with 6 additions and 1 deletions

View File

@ -109,7 +109,12 @@ local function get_lsp_diagnostics(bufnr)
}
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
return result