Config not working?
I've tried multiple things so far, the config does not seem to be read.
Here's what I have in my init.lua:
require("auto-save").setup {
enabled = false,
trigger_events = {"FocusLost"}
}
It ignores both clauses (not only is it enabled, it also saves when exiting insert mode).
Yes, this plugin doesn't read the configs correctly. You could try out the maintained fork (still WIP, the API could change): https://github.com/okuuva/auto-save.nvim
It also does already incorporate the FocusLost event.
Thanks, I ended up just doing it manually:
vim.api.nvim_create_autocmd({'FocusLost'}, {
command = 'silent! wa'
})
Apparently, this plugin is no longer maintained. The author should at least signal that's it's now archived.
@superDuperCyberTechno
I think bufdo is more efficient
api.nvim_create_autocmd( "FocusLost" , { command = "silent bufdo update" })