akinsho / toggleterm.nvim

A neovim lua plugin to help easily manage multiple terminal windows
GNU General Public License v3.0
4.06k stars 170 forks source link

[Feature Request] Support Vim Sessions #567

Open ColinKennedy opened 3 months ago

ColinKennedy commented 3 months ago

If you use Vim Sessions, e.g. :mksession Session.vim and then nvim -S Session.vim, the terminal buffer is restored but toggleterm.nvim doesn't recognize the restored terminal buffer as a "toggleterm" buffer. So the next :ToggleTerm call creates a second terminal. There's also other issues as well, for example the restored terminal won't have tte same styling as if it were created using :ToggleTerm.

Being able to restore the toggleterm terminal will likely require https://github.com/akinsho/toggleterm.nvim/issues/528 so I'd consider the two issues to be related.