From c2fbed0efc313e3d970c67e7affc66a6dc51adb6 Mon Sep 17 00:00:00 2001 From: zymon Date: Tue, 11 Feb 2025 09:46:05 +0100 Subject: [PATCH] session manager --- lua/znvim/plugins/editor.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lua/znvim/plugins/editor.lua b/lua/znvim/plugins/editor.lua index b0fe78f..a27d4c6 100644 --- a/lua/znvim/plugins/editor.lua +++ b/lua/znvim/plugins/editor.lua @@ -221,4 +221,17 @@ return { }, config = true, }, + { + "folke/persistence.nvim", + event = "BufReadPre", -- this will only start session saving when an actual file was opened + keys = { + {"qs", function() require("persistence").load() end, desc = "load session from cwd"}, + {"qS", function() require("persistence").select() end, desc = "select a session to load"}, + {"ql", function() require("persistence").load({ last = true }) end, desc = "load te last session"}, + {"qd", function() require("persistence").stop() end, desc = "stop persistence"}, + }, + opts = { + -- add any custom options here + } + }, }