diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index 69e8e8d3..3c9686b1 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -34,7 +34,7 @@ opt.pumblend = 10 -- Popup blend opt.pumheight = 10 -- Maximum number of entries in a popup opt.relativenumber = true -- Relative line numbers opt.scrolloff = 4 -- Lines of context -opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp" } +opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp", "folds" } opt.shiftround = true -- Round indent opt.shiftwidth = 2 -- Size of an indent opt.shortmess:append({ W = true, I = true, c = true, C = true }) diff --git a/lua/lazyvim/plugins/util.lua b/lua/lazyvim/plugins/util.lua index 7baa387e..c3870889 100644 --- a/lua/lazyvim/plugins/util.lua +++ b/lua/lazyvim/plugins/util.lua @@ -15,7 +15,7 @@ return { { "folke/persistence.nvim", event = "BufReadPre", - opts = { options = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp" } }, + opts = { options = vim.opt.sessionoptions:get() }, -- stylua: ignore keys = { { "qs", function() require("persistence").load() end, desc = "Restore Session" },