mirror of
https://github.com/zoriya/auto-save.nvim.git
synced 2026-08-06 06:07:12 +00:00
feat: allow to disable execution_message
Squashed changes from https://github.com/Pocco81/auto-save.nvim/pull/50 Got too hairy for a GH noob like me to fix properly.
This commit is contained in:
committed by
Oula Kuuva
parent
492bab0c47
commit
4db41a2155
@@ -82,15 +82,14 @@ function M.save(buf)
|
||||
|
||||
callback("after_saving")
|
||||
|
||||
api.nvim_echo({
|
||||
{
|
||||
(
|
||||
type(cnf.opts.execution_message.message) == "function" and cnf.opts.execution_message.message()
|
||||
or cnf.opts.execution_message.message
|
||||
),
|
||||
AUTO_SAVE_COLOR,
|
||||
},
|
||||
}, true, {})
|
||||
if cnf.opts.execution_message.enabled == true then
|
||||
echo_execution_message()
|
||||
end
|
||||
end
|
||||
|
||||
local function echo_execution_message()
|
||||
local msg = type(cnf.opts.execution_message.message) == "function" and cnf.opts.execution_message.message() or cnf.opts.execution_message.message
|
||||
api.nvim_echo({ { msg, AUTO_SAVE_COLOR } }, true, {})
|
||||
if cnf.opts.execution_message.cleaning_interval > 0 then
|
||||
fn.timer_start(cnf.opts.execution_message.cleaning_interval, function()
|
||||
cmd([[echon '']])
|
||||
|
||||
Reference in New Issue
Block a user