replace vim-auto-save with AutoSave.nvim

This commit is contained in:
siduck76
2021-07-02 15:17:36 +05:30
parent 76cdd5a29b
commit 50b00f4737
4 changed files with 31 additions and 4 deletions

View File

@@ -1,3 +1,5 @@
-- plugins made by @Pocco81 =)
local M = {}
M.config = function()
@@ -50,4 +52,25 @@ M.config = function()
)
end
-- autosave.nvim plugin disabled by default
M.autoSave = function()
local autosave = require("autosave")
autosave.setup(
{
enabled = vim.g.auto_save, -- takes boolean value from init.lua
execution_message = "autosaved at : " .. vim.fn.strftime("%H:%M:%S"),
events = {"InsertLeave", "TextChanged"},
conditions = {
exists = true,
filetype_is_not = {},
modifiable = true
},
write_all_buffers = true,
on_off_commands = true,
clean_command_line_interval = 2500
}
)
end
return M