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:
parent
97138dc6bf
commit
3a32e04af1
15
lua/config/autosave.lua
Normal file
15
lua/config/autosave.lua
Normal 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,
|
||||
})
|
||||
@ -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"})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user