Closed parik-shit closed 9 months ago
Okay, so I added FocusLost
event but it is still not working. I guess immediate save has already been implemented but seems to be having on my neovim config.
auto-save is only working when I leave Insert Mode
Could you give a bit more details on how exactly it isn't working? So it's not auto-saving at all or it's not auto-saving immediately?
Okay, so I added FocusLost event but it is still not working. I guess immediate save has already been implemented but seems to be having on my neovim config.
By default InsertLeave and TextChanged only trigger deferred save which saves the buffer automatically after debounce delay unless it gets cancelled by an event listed in the trigger_events.cancel_deferred_save table (by default only InsertEnter). If you want InsertLeave to trigger an automatic save you need to add it to trigger_events.immediate_save table and remove it from the trigger_events.defer_save table so that it doesn't trigger two saves. Check the configuration section in the readme for more details.
And if you migrated from pocco81/auto-save.nvim, make sure you update the plugins and restart neovim. Otherwise lazy might still be using the old version of the plugin.
It started working, IDK what was the problem. Thanks.
auto-save is only working when I leave Insert Mode