Closed otavioschwanck closed 1 year ago
If you can post an example of a session file that isn't working for you, that will help!
Make sure to strip personal information out.
If you can post an example of a session file that isn't working for you, that will help!
Make sure to strip personal information out.
the sessions that i posted are the ones that isn't working
Oops. That was a little stupid of me š
Oops. That was a little stupid of me š
Just to add here: Seems like the number of files open interferes on when the pins will be save or not.
I can reproduce using your provided session files. Something is definitely going on here.
Okay, I figured it out. The problem is this:
let Bufferline__session_restore = "lua require'bufferline.state'.restore_buffers { { name = \"/Users/otavio/.config/nvim/lua/user/lsp.lua\", pinned = true }, { name = \"/Users/otavio/.config/nvim/lua/core/mappings.lua\", pinned = false }, { name = \"/Users/otavio/.config/nvim/extra/alacritty.yml\", pinned = false }, { name = \"/Users/otavio/.config/nvim/lua/mood-scripts/bg-color.lua\", pinned = false }, { name = \"/Users/otavio/.config/nvim/lua/core/autocmds.lua\", pinned = false }, { name = \"/Users/otavio/.config/nvim/lua/plugins/neo-tree.lua\", pinned = false }, { name = \"/Users/otavio/.config/nvim/extra/.tmux.conf\", pinned = false }, { name = \"/Users/otavio/.config/nvim/lua/plugins/codeium.lua\", pinned = false }, { name = \"/Users/otavio/.config/nvim/lua/plugins/init.lua\", pinned = false }, { name = \"/Users/otavio/.config/nvim/lua/plugins/goto_preview.lua\", pinned = false }, { name = \"/Users/otavio/.config/nvim/lua/plugins/mini.lua\", pinned = false } }"
badd +1 lua/core/mappings.lua
badd +1 lua/plugins/init.lua
badd +10 lua/plugins/goto_preview.lua
badd +4 lua/plugins/mini.lua
badd +5 lua/plugins/codeium.lua
badd +36 lua/mood-scripts/bg-color.lua
badd +28 lua/plugins/neo-tree.lua
badd +18 extra/.tmux.conf
badd +1 extra/alacritty.yml
badd +100 lua/core/autocmds.lua
badd +14 lua/user/lsp.lua
What to do about it? That's what I have to figure out next.
Description
Sometime the buffer pins are not being saved. Not occurs everytime, it happens while using from some time. More the buffer count, more the chance of failing.
If i delete the session file it stop messing for a while.
My persistence config:
Session files generated from the gif:
First loan session: https://pasteio.com/xfWhLzAfiV6e
After i pin a buffer (lsp.lua) and call
vim.api.nvim_exec_autocmds('User', { pattern = 'SessionSavePre' })
manually: https://pasteio.com/xXnoZUpx8yQtAfter i close the neovim (the variable is pinned = true here): https://pasteio.com/x46HW0ih4ZVU
(if i reopen after this last close, the buffer will not be persisted for some reason
If i close the rest of the files, it will persisted normally for some reason.
I have a autosave (each 15s) for the session, i close and open all the time. i think is some point the session save is getting messed for some reason
EDIT: Just deleting the session and saving the same buffers make it works... but will break after a while. EDIT 2: Already broke hahah
init.vim: https://github.com/otavioschwanck/mood-nvim