From 5dd9b59b9070145f6068467d7384ed3b87f3406b Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 14 May 2026 16:30:06 +0100 Subject: [PATCH] Force saving --- lua/autocmd.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/autocmd.lua b/lua/autocmd.lua index e47fd39..a903e26 100644 --- a/lua/autocmd.lua +++ b/lua/autocmd.lua @@ -21,10 +21,10 @@ vim.api.nvim_create_autocmd('FocusLost', { nested = true, -- Allow other autocommands to run after this one }) -vim.api.nvim_create_autocmd('InsertLeave', { +vim.api.nvim_create_autocmd('BufLeave', { group = autosave_group, pattern = '*', - command = 'silent! wa', -- Save all files when leaving insert mode + command = 'silent! wa', -- Save all files when switching buffers nested = true, -- Allow other autocommands to run after this one })