feat(util): use lazy's notify instead of vim.notify

This commit is contained in:
Folke Lemaitre committed 2023-01-10 11:14:27 +01:00
1 parent 04a898a326
commit 48d1e8df12
2 files changed
+18 -18

No files matched your search

+7 -1
View File
@@ -1,10 +1,16 @@
local Util = require("lazy.core.util")
local M = {}
M.autoformat = true
function M.toggle()
M.autoformat = not M.autoformat
vim.notify(M.autoformat and "Enabled format on save" or "Disabled format on save")
if M.autoformat then
Util.info("Enabled format on save", { title = "Format" })
else
Util.warn("Disabled format on save", { title = "Format" })
end
end
function M.format()