mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix(toggle): use vim.diagnostic.is_disabled()
use `vim.diagnostic.is_disabled()` instad of local variable `enable` to tracking diagnostic status.
This commit is contained in:
parent
879e29504d
commit
d39c6867a8
1 changed files with 1 additions and 3 deletions
|
|
@ -41,10 +41,8 @@ function M.number()
|
|||
end
|
||||
end
|
||||
|
||||
local enabled = true
|
||||
function M.diagnostics()
|
||||
enabled = not enabled
|
||||
if enabled then
|
||||
if vim.diagnostic.is_disabled() then
|
||||
vim.diagnostic.enable()
|
||||
Util.info("Enabled diagnostics", { title = "Diagnostics" })
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue