replace vim-auto-save with AutoSave.nvim
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user