Skip to content

Commit 517e4fb

Browse files
authored
revert(#2781): "refactor: replace deprecated use of vim.diagnostic.is_disabled()" (#2784)
Revert "refactor: replace deprecated use of vim.diagnostic.is_disabled() (#2781)" This reverts commit 4215f33.
1 parent 4c8ddee commit 517e4fb

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lua/nvim-tree/diagnostics.lua

+4-6
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,12 @@ end
3939
local function from_nvim_lsp()
4040
local buffer_severity = {}
4141

42-
local is_enabled
43-
if vim.fn.has "nvim-0.10" == 1 then
44-
is_enabled = vim.diagnostic.is_enabled()
45-
else
46-
is_enabled = not vim.diagnostic.is_disabled()
42+
local is_disabled = false
43+
if vim.fn.has "nvim-0.9" == 1 then
44+
is_disabled = vim.diagnostic.is_disabled()
4745
end
4846

49-
if is_enabled then
47+
if not is_disabled then
5048
for _, diagnostic in ipairs(vim.diagnostic.get(nil, { severity = M.severity })) do
5149
local buf = diagnostic.bufnr
5250
if vim.api.nvim_buf_is_valid(buf) then

0 commit comments

Comments
 (0)