mirror of
https://github.com/zoriya/auto-save.nvim.git
synced 2025-12-06 06:36:11 +00:00
Made it compatible with the .editorconfig already present and didn't introduce any bells and whistles beyond that. Fixed the typo in .editorconfig indent_style while I was at it.
16 lines
292 B
Lua
16 lines
292 B
Lua
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
|