feat(toggle-diagnostics): revert to enable instead of status

This commit is contained in:
Iordanis Petkakis 2023-12-20 10:02:35 +02:00
parent 88e75615b1
commit 2c067f8003

View file

@ -41,10 +41,10 @@ function M.number()
end
end
local status = vim.diagnostic.is_disabled()
local enabled = not vim.diagnostic.is_disabled()
function M.diagnostics()
status = not status
if not status then
enabled = not enabled
if enabled then
vim.diagnostic.enable()
Util.info("Enabled diagnostics", { title = "Diagnostics" })
else