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