Skip to content

Commit

Permalink
fix: vim.diagnostic.is_disabled() deprecation warning (#907)
Browse files Browse the repository at this point in the history
This requires Neovim 0.10.0.
  • Loading branch information
fredrikaverpil committed May 19, 2024
1 parent 73540cb commit 2cd3984
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lua/bufferline/diagnostics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ local get_diagnostics = {
local results = {}
local diagnostics = vim.diagnostic.get()
for _, d in pairs(diagnostics) do
-- TODO remove is_disabled nil check when 0.9 is stable
if vim.diagnostic.is_disabled == nil or not vim.diagnostic.is_disabled(d.bufnr, d.namespace) then
if vim.diagnostic.is_enabled({ ns_id = d.namespace, bufnr = d.bufnr }) then
if not results[d.bufnr] then results[d.bufnr] = {} end
table.insert(results[d.bufnr], d)
end
Expand Down

0 comments on commit 2cd3984

Please sign in to comment.