mirror of
https://github.com/zoriya/auto-save.nvim.git
synced 2025-12-06 06:36:11 +00:00
20 lines
430 B
Lua
20 lines
430 B
Lua
|
|
local opts = require("autosave.config").options
|
|
local cmd = vim.cmd
|
|
|
|
local M = {}
|
|
|
|
local function setup_commands()
|
|
if (opts["on_off_commands"] == true) then
|
|
cmd([[command! ASOn lua require'autosave.main'.main('on')]])
|
|
cmd([[command! ASOff lua require'autosave.main'.main('off')]])
|
|
end
|
|
end
|
|
|
|
function M.setup(custom_opts)
|
|
require("autosave.config").set_options(custom_opts)
|
|
setup_commands()
|
|
end
|
|
|
|
return M
|