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

fix inverse synctex problem Issue #15 #23

Closed
wants to merge 11 commits into from

Conversation

ChasingZenith
Copy link

Fix #15.
The change is the parameters for nvim: -es is drop and --cmd is changed to -c. Both changes are necessary.
I don't know exactly which parameters do what. I just tune and get it. Please kindly check whether I will mess up other things.

@frabjous
Copy link
Owner

frabjous commented Apr 26, 2023

I don't understand the point of either change. The only difference is between -c and --cmd is whether or not other config files are sourced before the command, but the command in question requires everything it needs; I don't see why other configs would be needed. All -es does is make the command silent, and since it runs in the background, that shouldn't have any visible effect. Can someone post a reproducible set up in which these changes make a difference?

@ChasingZenith
Copy link
Author

ChasingZenith commented Apr 26, 2023

I don't know how theses changes make it work either. What I can confirm is that both changes is necessary for me. After making it work, I tried to read the neovim doc, but remained confused. 2 people have given me 👍🏻️ and 🚀️ for my solution in #15 so I think it also works for them and I make this pull request. Maybe we can ask other people there whether this also work for them.

(BTW, respect for making such a great latex tool.)

@ChasingZenith
Copy link
Author

Also vimtex sioyek configuration use -c only. Maybe we can ask lervag for help.

@frabjous
Copy link
Owner

frabjous commented Jun 5, 2023

I'm not comfortable merging a pull request when I don't understand the problem the request is supposed to solve, cannot replicate it myself, and the changes seem to actually make things worse.

Why load an entire configuration file before enacting the script's function when there is no need to? That'll just slow it down. Why not silence output that cannot be seen anyway? Again, leaving that output unsilenced is just likely to slow things down.

I made the choices I did for a reason, and I can't figure out why those choices are bad, so I just don't feel comfortable making changes.

Sorry -- I know you mean well -- but I don't see why vimtex doing something a certain way is of any relevance at all.

@ChasingZenith
Copy link
Author

ChasingZenith commented Jun 6, 2023

Nice to see your response. I doubt the problem may relate to whether the lua module knaphelper could be found. Now I try keep -es and --cmd and add one more --cmd to add knap in to rtp. This approach also works for me

        textopdfviewerlaunch = "sioyek %outputfile% --inverse-search 'nvim --headless -es --cmd \"set rtp+=~/.cache/vimfiles/repos/github.com/frabjous/knap/\" --cmd \"lua require('\"'\"'knaphelper'\"'\"').relayjump('\"'\"'%servername%'\"'\"','\"'\"'%1'\"'\"',%2,%3)\"' ",

I think the problem relates to how I the package managers load plugins. I am using SpaceVim, which uses dein.vim as the plugin manager.

@ChasingZenith
Copy link
Author

Nice to see your response. I doubt the problem may relate to whether the lua module knaphelper could be found. Now I try keep -es and --cmd and add one more --cmd to add knap in to rtp. This approach also works for me

        textopdfviewerlaunch = "sioyek %outputfile% --inverse-search 'nvim --headless -es --cmd \"set rtp+=~/.cache/vimfiles/repos/github.com/frabjous/knap/\" --cmd \"lua require('\"'\"'knaphelper'\"'\"').relayjump('\"'\"'%servername%'\"'\"','\"'\"'%1'\"'\"',%2,%3)\"' ",

I think the problem relates to how I the package managers load plugins. I am using SpaceVim, which use dein.vim as plugin manager.

@frabjous
Copy link
Owner

Sorry it's taken me awhile to look at this. As a matter of principle, I'd strongly prefer not to hard code names of external programs in the main code like xdotool or busctl. You can create new settings for these things and allow the user to change them. I'm on wayland (hyprland not on GNOME) and can't use xdotool. The English in the suggested README change is poor. In general, I'm not very enthusiastic about merging this in this form. I can't really test it.

However, I'm not really using this plugin at all any more. If you wanted to take over the project, I'd consider handing it over. (You can change the name!)

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

Successfully merging this pull request may close these issues.

Inverse synctex doesn't work with Sioyek
2 participants