since dividing and loading each windows every time are kinda bothersome, I saved my session using:
mksession ~/session1.vim
and restored it usi
I can across this Issue using the Obsession vim plugin and Neovim aswell. The answer in this thread helped me finding the solution although in my case the solution provided here didn't work immediately.
I took a look at the sessionoptions help page. For me the setting that fixed the problem was set sessionoptions+=localoptions
. Then after reloading vim with this option in the config and after reloading the syntax highlighting, the highlighting was saved in the session.