fix(sessions): added folds to sessions

This commit is contained in:
Folke Lemaitre 2023-10-27 18:34:33 +02:00
parent 7831fc94ca
commit e01ad513aa
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@ opt.pumblend = 10 -- Popup blend
opt.pumheight = 10 -- Maximum number of entries in a popup opt.pumheight = 10 -- Maximum number of entries in a popup
opt.relativenumber = true -- Relative line numbers opt.relativenumber = true -- Relative line numbers
opt.scrolloff = 4 -- Lines of context 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.shiftround = true -- Round indent
opt.shiftwidth = 2 -- Size of an indent opt.shiftwidth = 2 -- Size of an indent
opt.shortmess:append({ W = true, I = true, c = true, C = true }) opt.shortmess:append({ W = true, I = true, c = true, C = true })

View file

@ -15,7 +15,7 @@ return {
{ {
"folke/persistence.nvim", "folke/persistence.nvim",
event = "BufReadPre", event = "BufReadPre",
opts = { options = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp" } }, opts = { options = vim.opt.sessionoptions:get() },
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>qs", function() require("persistence").load() end, desc = "Restore Session" }, { "<leader>qs", function() require("persistence").load() end, desc = "Restore Session" },