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

This commit is contained in:
Folke Lemaitre 2023-01-10 10:08:51 +01:00
parent 04a898a326
commit 48d1e8df12
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 18 additions and 18 deletions

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()