mirror of
https://github.com/zoriya/auto-save.nvim.git
synced 2026-08-06 22:28:06 +00:00
style: autoformat all the things
Namely: applied stylua to the whole repo and ran marksman on README.md.
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
local TITLE = "auto-save"
|
||||
|
||||
return function(msg, kind)
|
||||
local has_notify_plugin = pcall(require, "notify")
|
||||
local level = {}
|
||||
local has_notify_plugin = pcall(require, "notify")
|
||||
local level = {}
|
||||
|
||||
if kind == "error" then
|
||||
level.log = vim.log.levels.ERROR
|
||||
level.type = "error"
|
||||
elseif kind == "warn" then
|
||||
level.log = vim.log.levels.WARN
|
||||
level.type = "error"
|
||||
else
|
||||
level.log = kind or vim.log.levels.INFO
|
||||
level.type = "info"
|
||||
end
|
||||
if kind == "error" then
|
||||
level.log = vim.log.levels.ERROR
|
||||
level.type = "error"
|
||||
elseif kind == "warn" then
|
||||
level.log = vim.log.levels.WARN
|
||||
level.type = "error"
|
||||
else
|
||||
level.log = kind or vim.log.levels.INFO
|
||||
level.type = "info"
|
||||
end
|
||||
|
||||
if has_notify_plugin then
|
||||
vim.notify(msg, level.log, {
|
||||
title = TITLE,
|
||||
})
|
||||
else
|
||||
vim.notify(("%s: %s"):format(TITLE, msg), level.log)
|
||||
end
|
||||
if has_notify_plugin then
|
||||
vim.notify(msg, level.log, {
|
||||
title = TITLE,
|
||||
})
|
||||
else
|
||||
vim.notify(("%s: %s"):format(TITLE, msg), level.log)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user