Multiple knap sessions
pako-github opened this issue · 2 comments
First of all thanks very much for your plugin, I enjoy it daily. One thing bothers me though: if I open two tex files in different nvim sessions then on the second session the preview will not start. If I close the pdf viewer (sioyek) of the first session, it will work on the second session. Is there any way to have a preview on the second session without closing the one of the first session?
Thanks for the feedback.
I'm a bit busy right now and can't investigate too much, but I think this is a result of the use of --reuse-instance
in the default settings for textopdfviewerlaunch
command. That clearly needs to be there in in textopdfforwardjump
to keep Sioyek from opening the forward search target in a new window, but you could try removing it from the launch command, or change it to --new-instance
or --new-window
and see if that works better for you, e.g.,
textopdfviewerlaunch = "sioyek --inverse-search 'nvim --headless -es --cmd \"lua require('\"'\"'knaphelper'\"'\"').relayjump('\"'\"'%servername%'\"'\"','\"'\"'%1'\"'\"',%2,%3)\"' --new-instance %outputfile%",
I feel like I tried that a long time ago and it had unintended consequences, which is why I put --reuse-instance
back in. But it's been a long time and Sioyek has added options since then. I'd try it with both --new-instance
and --new-window
and see what happens. If either works for you, please report back here, and I'll test it myself and if it works, I'll consider making it the default. But if neither does, you might have to wait until I have more time to took at this; and it might depend on Sioyek's capabilities more than the plugin.
You might try other viewers listed in the README and see if they cooperate better as well.
Thanks very much for your quick reply. Your suggestion with --new-instance
works so far. I'll come back later if I encouter any problems.