File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 39
39
local function from_nvim_lsp ()
40
40
local buffer_severity = {}
41
41
42
- local is_disabled = false
43
- if vim .fn .has " nvim-0.9" == 1 then
44
- is_disabled = vim .diagnostic .is_disabled ()
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 () --- @diagnostic disable-line : deprecated
45
47
end
46
48
47
- if not is_disabled then
49
+ if is_enabled then
48
50
for _ , diagnostic in ipairs (vim .diagnostic .get (nil , { severity = M .severity })) do
49
51
if diagnostic .severity and diagnostic .bufnr and vim .api .nvim_buf_is_valid (diagnostic .bufnr ) then
50
52
local bufname = uniformize_path (vim .api .nvim_buf_get_name (diagnostic .bufnr ))
You can’t perform that action at this time.
0 commit comments