neoclide / coc-vimtex

vimtex integration for coc.nvim
130 stars 4 forks source link

Go to Declaration on project files not working #11

Closed andregpss closed 4 years ago

andregpss commented 4 years ago

When i type gd or 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, TocToogle...). Goto file gfis also working.

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

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

I am using NeoVim 0.4.3, coc 0.0.74 on Windows 10.

TEX Example (sec:background declared on other file)

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

kabouzeid commented 4 years ago

https://github.com/neoclide/coc-vimtex/issues/10#event-3058935261

chemzqm commented 4 years ago

No such support use language server for tex instead.

andregpss commented 4 years ago

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

nmap \<leader>d :exec "tag ".expand("\<cword>")\<CR>

I also added to vimrc file:

let g:gutentags_project_root = ['main.tex']

chemzqm commented 4 years ago

There is https://github.com/fannheyward/coc-texlab could help.