fix: [#30] Don't turn autosave on before reading user config (#32)

This commit is contained in:
Toni Müller
2023-07-21 08:32:46 +02:00
committed by GitHub
parent c7427f4d78
commit db206fda28
2 changed files with 9 additions and 11 deletions
-10
View File
@@ -1,15 +1,5 @@
if vim.g.loaded_auto_save then
return
end
vim.g.loaded_auto_save = true
local command = vim.api.nvim_create_user_command
local cnf = require("auto-save.config").opts
command("ASToggle", function()
require("auto-save").toggle()
end, {})
if cnf.enabled then
require("auto-save").on()
end