From fc6d846a0c243d0c8bb165b1aef2d1e2709cbc1d Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Wed, 30 Jul 2025 16:31:00 +0300 Subject: Deleted a bunch of stuff I didn't need from nvim config --- .config/nvim/lua/plugins/auto-save.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to '.config/nvim/lua/plugins/auto-save.lua') diff --git a/.config/nvim/lua/plugins/auto-save.lua b/.config/nvim/lua/plugins/auto-save.lua index 99ff70e..7c5578e 100644 --- a/.config/nvim/lua/plugins/auto-save.lua +++ b/.config/nvim/lua/plugins/auto-save.lua @@ -30,8 +30,11 @@ return { -- Might be unrelated tho -- Oil error is "cannot save, action already in progress" - -- Save only if the buffer is not a "special buffer" - return vim.fn.getbufvar(buf, '&buftype') == '' + local buftype = vim.fn.getbufvar(buf, '&buftype') + local filetype = vim.bo[buf].filetype + + -- Don't autosave special buffers or Oil buffers + return buftype == '' and filetype ~= 'oil' end, } end, -- cgit v1.3.1