-
Notifications
You must be signed in to change notification settings - Fork 395
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
VimtexInverseSearch crashes LunarVim #2863
Comments
Do not lazy-load VimTeX (at all); this will prevent it from working and is not necessary (it lazy-loads itself, as plugins should). |
Lunarvim uses folke/lazy.nvim. |
I cannot give advice on Lunarvim (except don't use it). If you use lazy.nvim itself, you should consult the docs. |
The common reason for this is that people lazy load VimTeX. It is quite easy to check this. If you open Neovim from a terminal with Another way to check: Run
You should NOT use Try this: lvim.plugins = {
{
"lervag/vimtex",
lazy = false,
init = function()
vim.g.vimtex_view_method = 'zathura'
end,
},
} Notice that we specify to not lazy load and that configuration is added in the
That indicates that you are lazy loading stuff.
That is expected. You should not use |
Thank you for the detailed answer. I have adjusted my config as you suggested
Unfortunately, the behavior is still the same. Forwardsearch works just fine, inversesearch not. Also, when I run There are some vimtex scripts, but probably not all? It looks to me as if the |
What happens if you run |
No, this will open vanilla neovim. To run LunarVim I have to use the lvim command. I was able to fix my issue by switching to LazyVim and using the vimtex settings that you recommended. |
Ok! In this case, you have to set the
Glad to hear it! |
Thank you so much @lervag! I had exactly the same problem in LunarVim and setting I'll note that lazy loading was not the problem (using the "standard" way to load plugins worked fine in LunarVim). Finally, I'll add that I'm running Wayland, so I also needed to set |
Great, glad to hear it! If there's a LunarVim wiki or something similar where people share things related to configuring plugins in LunarVim, perhaps this is relevant stuff to add there?
Lazy loading will break inverse search. And lazy loading of VimTeX does not really bring any significant benefit, so please, just don't do that.
👍🏻 |
I just created a pull request in LunarVim to add the vimtex inverse search capability to the |
Description
So, I'm currently trying to set up vimtex forwardsearch and inversesearch with Zathura. Forwardsearch works like a charm, while inversesearch does not. To narrow down the problem I reinstalled LunarVim, this is my current config:
Since the inversesearch from Zathura to Lunarvim (ctrl + click on a line in the PDF) does not work, I tried this Zathura command:
zathura -l debug -x "/usr/bin/nvim/bin/nvim --headless -c \"VimtexInverseSearch %{line} '%{input}'\"" --synctex-forward 1:9:'/home/max/LaTeX/hello_world.tex' 'hello_world.pdf'&
which opens the PDF at the desired line. When I try to invoke the inversesearch usingctrl click
in the PDF, I get this error:So there seems to be an issue with
VimtexInverseSearch
. When I open the.tex
file usinglvim hello_world.tex
and then run:VimtexInverseSearch 10 hello_world.tex
LunarVim instantly shuts down.Steps to reproduce
No response
Expected behavior
No response
Actual behavior
No response
Do you use a latexmkrc file?
No
VimtexInfo
The text was updated successfully, but these errors were encountered: