persistent-breakpoints.nvim
persistent-breakpoints.nvim copied to clipboard
Doesn't work well with sessions
The problem I have is when I have buffers
in sessionoptions
and save/restore a session with some buffers having breakpoints. Apparently, upon restoring session neovim adds buffers to your buffer list, but doesn't load their contents. And so when breakpoints.set
is called with a line number, the breakpoint ends up at the beginning of the file. I've tried various Buf*
events in the config.
Could we somehow add code that loads the related buffers before setting the breakpoints in them?
I replicated this by adding a breakpoint to a file, navigating to another file, then :mksession!
, close neovim, open neovim, :source Session.vim
and navigating back to the file with a breakpoint