diff options
| author | Kyren223 <Kyren223@proton.me> | 2025-07-30 16:31:00 +0300 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2025-07-30 16:31:00 +0300 |
| commit | fc6d846a0c243d0c8bb165b1aef2d1e2709cbc1d (patch) | |
| tree | 443e111e2cb976808860a4e7eb267284ecfdcbb1 /.config/nvim/lua/plugins/auto-save.lua | |
| parent | f1aaab01694c21a32b9eacae169f9a3c95a840d5 (diff) | |
Deleted a bunch of stuff I didn't need from nvim config
Diffstat (limited to '.config/nvim/lua/plugins/auto-save.lua')
| -rw-r--r-- | .config/nvim/lua/plugins/auto-save.lua | 7 |
1 files changed, 5 insertions, 2 deletions
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, |
