Install persistence.nvim with lazy.nvim
mainTo install persistence.nvim using lazy.nvim, add the plugin to your configuration. It is recommended to use the BufReadPre event so that session saving only starts when an actual file is opened.
-- Lua
{
"folke/persistence.nvim",
event = "BufReadPre", -- this will only start session saving when an actual file was opened
opts = {
-- add any custom options here
}
}