mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-12 18:34:36 +02:00
fix: deprecation warning on diagnostic.is_disabled
This commit is contained in:
parent
03653dbe35
commit
960ec8079b
1 changed files with 3 additions and 1 deletions
|
@ -43,7 +43,9 @@ local enabled = true
|
|||
function M.diagnostics()
|
||||
-- if this Neovim version supports checking if diagnostics are enabled
|
||||
-- then use that for the current state
|
||||
if vim.diagnostic.is_disabled then
|
||||
if vim.diagnostic.is_enabled then
|
||||
enabled = vim.diagnostic.is_enabled()
|
||||
elseif vim.diagnostic.is_disabled then
|
||||
enabled = not vim.diagnostic.is_disabled()
|
||||
end
|
||||
enabled = not enabled
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue