We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7add15 commit b6b4c32Copy full SHA for b6b4c32
lua/nvim-tree/diagnostics.lua
@@ -39,12 +39,14 @@ end
39
local function from_nvim_lsp()
40
local buffer_severity = {}
41
42
- local is_disabled = false
43
- if vim.fn.has "nvim-0.9" == 1 then
44
- is_disabled = vim.diagnostic.is_disabled()
+ local is_enabled
+ if vim.fn.has "nvim-0.10" == 1 then
+ is_enabled = vim.diagnostic.is_enabled()
45
+ else
46
+ is_enabled = not vim.diagnostic.is_disabled() ---@diagnostic disable-line: deprecated
47
end
48
- if not is_disabled then
49
+ if is_enabled then
50
for _, diagnostic in ipairs(vim.diagnostic.get(nil, { severity = M.severity })) do
51
if diagnostic.severity and diagnostic.bufnr and vim.api.nvim_buf_is_valid(diagnostic.bufnr) then
52
local bufname = uniformize_path(vim.api.nvim_buf_get_name(diagnostic.bufnr))
0 commit comments