Skip to content

Commit bc079ff

Browse files
Drake NelsonCHNB128
authored andcommitted
Fix deprecated vim.lsp.diagnostic.get_count call
1 parent d544cb9 commit bc079ff

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lua/galaxyline/provider_diagnostic.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ local function get_nvim_lsp_diagnostic(diag_type)
2121
local count = 0
2222

2323
for _, client in ipairs(active_clients) do
24-
count = count + lsp.diagnostic.get_count(api.nvim_get_current_buf(),diag_type,client.id)
24+
local opts = { severity = diag_type }
25+
opts.namespace = vim.diagnostic.get_namespace(client.id)
26+
count = count + vim.diagnostic.get(api.nvim_get_current_buf(),opts)
2527
end
2628

2729
if count ~= 0 then return count .. ' ' end

0 commit comments

Comments
 (0)