Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple knap sessions #14

Open
pako-github opened this issue Nov 17, 2022 · 2 comments
Open

Multiple knap sessions #14

pako-github opened this issue Nov 17, 2022 · 2 comments

Comments

@pako-github
Copy link

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?

@frabjous
Copy link
Owner

frabjous commented Nov 17, 2022

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.

@pako-github
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants