1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

replace vim-auto-save with AutoSave.nvim

This commit is contained in:
jdhao 2021-10-16 00:08:36 +08:00
parent 97138dc6bf
commit 3a32e04af1
2 changed files with 16 additions and 1 deletions

15
lua/config/autosave.lua Normal file
View File

@ -0,0 +1,15 @@
require("autosave").setup({
enabled = true,
execution_message = "Autosaved at " .. vim.fn.strftime("%H:%M:%S"),
events = { "InsertLeave", "TextChanged" },
conditions = {
exists = true,
filename_is_not = {},
filetype_is_not = {},
modifiable = true,
},
write_all_buffers = false,
on_off_commands = true,
clean_command_line_interval = 1000,
debounce_delay = 135,
})

View File

@ -149,7 +149,7 @@ require("packer").startup({
-- use 'mg979/vim-visual-multi'
-- Autosave files on certain events
use({"907th/vim-auto-save", event = "VimEnter"})
use({"Pocco81/AutoSave.nvim", event = "VimEnter", config = [[require('config.autosave')]]})
-- Show undo history visually
use({"simnalamburt/vim-mundo", event = "VimEnter"})