Closed shaun-mathew closed 2 years ago
Hey @shaun-mathew. Have you looked at implementing your own custom callbacks? I use them to stop minimap
being recorded into my session.
Yep, I added something like this to my config that gets the job done:
config = function()
require("persisted").setup {
autosave = true,
before_save = function()
vim.cmd "NvimTreeClose"
end,
}
end
I was just wondering if what I suggested would be possible as a sort of convenience method where the user could specify a list of filetypes and before saving the session, the plugin could go around closing all windows with that filetype. Although, I assume it would get a bit messy.
The reason for adding the callbacks was mainly because I was seeing a lot of singular edge cases crop up that if addressed directly in the plugin, would move it further away from being a "simple session management" plugin.
I ultimately see the callbacks as the plugin's admission that it will never be able to cater for everyone's use cases and therefore it should give the user the ability to dictate how it functions for their given workflow.
Hi ouhm 😅 I'm in trouble with this issue. Is there any config that ignores the window and the buffer of nvim-tree? Thank you!
Sometimes I close Neovim with NvimTree or Trouble open and upon loading the Session, an empty NvimTree buffer and a pane is created to the side. It would be a nice feature if we could ignore certain filetypes when saving sessions.
Screenshot After loading session: