Closed coffebar closed 9 months ago
Commenting just to +1 this, I am religiously checking in on the status of this issue.
FWIW neovim by default will attempt to restore a terminal buffer in a session as long as the user includes terminal
in the sessionoptions
. It will not restore the contents of the terminal and will generally just re-run the command that spawned the terminal if it was included in the name IIRC.
This plugin used to and is supposed to at least support that basic use case i.e. allow neovim to re-open and relaunch the terminal.
On the subject of restoring terminal output this is absolutely an issue for neovim upstream and definitely not for this plugin but is probably a non-starter. Don't think a person can re-open a session and pick back up with a terminal from another session since that buffer was destroyed and it's history is gone.
On the subject of just re-opening terminal from one session to another that should work similarly to the native functionality and that just needs fixing i.e. not sure what/when it broke.
I personally will not have time for this any time soon, anyone in the community is free to dig into the code base and try and restore the session behaviour and I will look at a PR. If no one else is willing to pick this up there's really no reason to check the status of this issue religiously as it will need someone to actually do the legwork.
Hi, I have a plugin neovim-project, that manages projects as sessions. Project switching in based on
:mks
command. I see 0 existing plugins that support to keep terminals attached to sessions, and understand the reasons. But, I think maybe it's possible to implement this workflow in coop with toggleterm:Sound interesting?
neovim-project has an interface to be extended with save some data from other plugins. Data will be saved to the session file and restored back. It can be a terminal address or some other strings/tables.
So we can save some sort of link to the terminal on saving session and check it on restoring - if this terminal not still exists, restore it.
I am not familiar with how toggleterm works, and just asking: