Vimtex: Go to Definition not working on multi-file project

Created on 20 Feb 2020  路  5Comments  路  Source: lervag/vimtex

Issue

When i type gd mapping key to find the definition of a reference located on an other project file, the following error message comes:

[coc.nvim] Definition provider not found for current document

All the other features are working (compiling, completion, pdf viewing...). Goto file gf is also working.

I am working on an multi-file project using subfile package.

There is no error on Coc log, either on Vimtex log.

TEX Example

\documentclass[main]{subfiles}
\begin{document}
\section{Related Work}\label{sec:related}
As we mentioned before in Section \ref{sec:background}, ....
\end{document}

bug

All 5 comments

I'm sorry, but vimtex is not a language server and is not related to coc.nvim. So you are asking for something that is not meant to be provided by vimtex. Also, if you get a message from coc.nvim with the gd mapping, then you have changed the default maps and not supplied any information about that.

I'm closing this issue for now. Feel free to reopen, but if you do, please provide a minimal example, including a minimal vimrc file, and a more precise issue description that properly explains why this is an issue with vimtex.

I am using ctags now for solving this problem. I am also using gutentags to generate the tags.
Finally, i mapped the following command:

nmap \

You might be interested in texlab.

You might be interested in texlab.

I tested Texlab also, but code completion did not work as well as on vimtex. In a project with multiple files, texlab usually don't show the labels defined in other files. So, i decided to use vimtex. As i commented above, ctags gave me what i want and i do not need Texlab now.
Thanks.

No problem. Btw, I think it is possible to use texlab along vimtex. I've not tested it myself, though.

In any case, feel free to open new issues if you have other questions/problems!

Was this page helpful?
0 / 5 - 0 ratings