You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a long standing issue for me, that I think is unrelated to persisted.nvim but nevertheless hard to track down. I've been using this workaround for a year or so and realized I should share it in case it's of help to anyone:
vim.api.nvim_create_autocmd("User", {
desc="Recompute folds after session is loaded",
pattern="PersistedLoadPost",
group=vim.api.nvim_create_augroup("PersistedHooks", {}),
callback=function()
vim.defer_fn(function()
vim.cmd("normal! zx")
end, 50) -- Small delay seems necessaryend
})
My vim.opt.sessionoptions also doesn't contain folds.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is a long standing issue for me, that I think is unrelated to persisted.nvim but nevertheless hard to track down. I've been using this workaround for a year or so and realized I should share it in case it's of help to anyone:
My
vim.opt.sessionoptions
also doesn't containfolds
.Related issues are telescope #699 and nvim-treesitter #1337.
P.s. nvim-ufo is another option for those who “just want it fixed” and move on.
Beta Was this translation helpful? Give feedback.
All reactions