From e0ef6130327d02b644c2ab4c97fd159ec0154f93 Mon Sep 17 00:00:00 2001 From: "Gustavo \"Guz\" L de Mello" Date: Wed, 10 Dec 2025 17:50:32 -0300 Subject: [PATCH] feat(plugins): auto-saving and auto-sessions --- lua/dot/plugins.lua | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/lua/dot/plugins.lua b/lua/dot/plugins.lua index 6644cd3..3eef8ad 100644 --- a/lua/dot/plugins.lua +++ b/lua/dot/plugins.lua @@ -204,4 +204,39 @@ lze.load({ }, -- Auto-saving + { + "auto-save.nvim", + after = function() + require("auto-save").setup({ + condition = function(buf) + if vim.bo[buf].filetype == "harpoon" then + return false + end + return true + end, + }) + end, + cmd = "ASToggle", + event = { "InsertLeave", "TextChanged" }, + }, + + -- Session restore in git repos + { + "auto-session", + after = function() + require("auto-session").setup() + end, + cmd = { + "SessionSave", + "SessionRestore", + "SessionDelete", + "SessionDisableAutoSave", + "SessionToggleSave", + "SessionPurgeOrphaned", + "SessionSearch", + "Auutosession", + }, + lazy = not (#vim.fs.root(0, ".git") > 0), + }, + })