Skip to content

Commit

Permalink
Fix deprecated vim.lsp.diagnostic.get_count call
Browse files Browse the repository at this point in the history
  • Loading branch information
Drake Nelson authored and CHNB128 committed Jan 14, 2022
1 parent d544cb9 commit bc079ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/galaxyline/provider_diagnostic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ local function get_nvim_lsp_diagnostic(diag_type)
local count = 0

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

if count ~= 0 then return count .. ' ' end
Expand Down

0 comments on commit bc079ff

Please sign in to comment.