fannheyward / coc-texlab

TexLab extension for coc.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error on latex.ForwardSearch using tectonic and custom outdir

anthony-darienzo opened this issue · comments

Hello,

To compile latex files, I use tectonic, and I set -outdir=./build. Unfortunately this causes an error when calling latex.ForwardSearch:

[coc.nvim]: Error on "runCommand": Cannot read properties of null (reading 'status')

After some experimenting, I've found:

  • I have this issue in both vim8 and neovim.
  • When I remove the -outdir flag, forward search works as expected.
  • When I manually move the .pdf and .synctex.gz into the same directory as the latex source, forward search works.

Could it be that I am missing an extra setting for synctex and a custom outdir?

Extra info: running macos and using Skim for the PDF viewer.

Here is coc-settings.json:

"texlab.build.executable": "tectonic",
    "texlab.build.args": [
        "%f",
        "--keep-logs",
        "--synctex",
        "--outdir=./build"
    ],
"texlab.auxDirectory": "./build",
"texlab.build.onSave": true,
"texlab.chktex.onOpenAndSave": true,
"texlab.build.forwardSearchAfter": false,
"texlab.forwardSearch.executable": "/Applications/Skim.app/Contents/SharedSupport/displayline",
"texlab.forwardSearch.args": ["-r", "-d", "%l","%p","%f"]