mirror of
https://github.com/zoriya/auto-save.nvim.git
synced 2026-06-05 11:29:09 +00:00
fix: ASToggle command
This commit is contained in:
@@ -137,8 +137,10 @@ end
|
|||||||
function M.toggle()
|
function M.toggle()
|
||||||
if autosave_running then
|
if autosave_running then
|
||||||
M.off()
|
M.off()
|
||||||
|
echo("off")
|
||||||
else
|
else
|
||||||
M.on()
|
M.on()
|
||||||
|
echo("on")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,6 @@ return function(msg, kind)
|
|||||||
title = TITLE,
|
title = TITLE,
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
vim.notify(("%s (%s): %s"):format(TITLE, level.type, msg), level.log)
|
vim.notify(("%s: %s"):format(TITLE, msg), level.log)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ vim.g.loaded_auto_save = true
|
|||||||
local command = vim.api.nvim_create_user_command
|
local command = vim.api.nvim_create_user_command
|
||||||
local cnf = require("auto-save.config").options
|
local cnf = require("auto-save.config").options
|
||||||
|
|
||||||
command("AToggle", function()
|
command("ASToggle", function()
|
||||||
require("auto-save").toggle()
|
require("auto-save").toggle()
|
||||||
end, {})
|
end, {})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user