Skip to content

VimtexInverseSearch crashes LunarVim #2863

Closed
@karmatothex

Description

@karmatothex

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:

vim.g['vimtex_view_method'] = 'zathura'
vim.g['vimtex_view_general_viewer'] = 'zathura'

lvim.plugins = {
		{
			"lervag/vimtex",
			config = function()
				vim.cmd("call vimtex#init()")
			end,
		},
}

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 using ctrl click in the PDF, I get this error:

    Error detected while processing command line:
    E492: Not an editor command: VimtexInverseSearch 23 '/home/max/LaTeX/./hello_world.tex'

So there seems to be an issue with VimtexInverseSearch . When I open the .tex file using lvim 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

System info:
  OS: Ubuntu 22.04 LTS
  Vim version: NVIM v0.9.5
  Has clientserver: true
  Servername: /run/user/1000/lvim.15237.0

VimTeX project: hello_world
  base: hello_world.tex
  root: /home/max/test/LaTeX
  tex: /home/max/test/LaTeX/hello_world.tex
  main parser: fallback current file
  document class: scrartcl
  packages: epstopdf-base footmisc graphics graphicx inputenc keyval scrbase scrkbase scrlfile scrlfile-hook scrlogo tocbasic trig typearea xcolor
  compiler: latexmk
    engine: -pdf
    options:
      -verbose
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    callback: 1
    continuous: 1
    executable: latexmk
    job: 
      jobid: 7
      output: /tmp/lvim.max/a8Bngk/0
      cmd: max_print_line=2000 latexmk -verbose -file-line-error -synctex=1 -interaction=nonstopmode  -pdf -pvc -pvctimeout- -view=none -e '$compiling_cmd = ($compiling_cmd ? $compiling_cmd . " ; " : "") . "echo vimtex_compiler_callback_compiling"' -e '$success_cmd = ($success_cmd ? $success_cmd . " ; " : "") . "echo vimtex_compiler_callback_success"' -e '$failure_cmd = ($failure_cmd ? $failure_cmd . " ; " : "") . "echo vimtex_compiler_callback_failure"' 'hello_world.tex'
      pid: 15249
  viewer: Zathura
    xwin id: 0
    cmd_start: zathura  -x "/usr/bin/nvim/bin/nvim --headless -c \"VimtexInverseSearch %{line} '%{input}'\"" --synctex-forward 1:1:'/home/max/test/LaTeX/hello_world.tex' 'hello_world.pdf'&
  qf method: LaTeX logfile

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions