Files
auto-save.nvim/lua/autosave/config.lua
T
2021-07-01 20:36:29 -05:00

28 lines
579 B
Lua

local config = {}
config.options = {
enabled = true,
execution_message = "AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S"),
events = {"InsertLeave", "TextChanged"},
conditions = {
exists = true,
filetype_is_not = {},
modifiable = true,
},
write_all_buffers = false,
on_off_commands = false,
clean_command_line_interval = 0
}
function config.set_options(opts)
opts = opts or {}
for opt, _ in pairs(opts) do
if (config.options[opt] ~= nil) then -- not nil
config.options[opt] = opts[opt]
end
end
end
return config