neoclide / coc-vimtex

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

'[coc.nvim] vimtex not loaded, please check your runtimepath' error since last update #31

Closed lamabro23 closed 2 years ago

lamabro23 commented 2 years ago

The extension stopped working for me after the recent update to version 1.1.2.

Every time I open a .tex file, the [coc.nvim] vimtex not loaded, please check your runtimepath error message pops up.

:CocOpneLog output:

2022-03-08T21:19:13.525 ERROR (pid:1663156) [node-client] - request error on "nvim_eval" [ 'vimtex#re#deoplete' ] Vim(return):E121: Undefined variable: vimtex#re#deoplete Error
    at O1.request ($PATH_TO_VIM_DIR/.vim/plugged/coc.nvim/build/index.js:29:43511)
    at O1.eval ($PATH_TO_VIM_DIR/.vim/plugged/coc.nvim/build/index.js:34:3435)
    at activate (~/.config/coc/extensions/node_modules/coc-vimtex/src/index.js:10:24)
    at active (~/.config/coc/extensions/node_modules/coc-vimtex/src/index.js:77:5)
    at Object.exports.activate (~/.config/coc/extensions/node_modules/coc-vimtex/src/index.js:81:7)
    at $PATH_TO_VIM_DIR/.vim/plugged/coc.nvim/build/index.js:249:1411
    at new Promise (<anonymous>)
    at Object.activate ($PATH_TO_VIM_DIR/.vim/plugged/coc.nvim/build/index.js:249:1369)
    at V7.activate ($PATH_TO_VIM_DIR/.vim/plugged/coc.nvim/build/index.js:246:7425)
    at $PATH_TO_VIM_DIR/.vim/plugged/coc.nvim/build/index.js:248:283

The issue is gone after downgrading to a version <1.1.1.

chemzqm commented 2 years ago

Try :echo eval('vimtex#re#deoplete') in your vim.

lamabro23 commented 2 years ago

This is the output:

\\(?:(?:\w*cite|Cite)\w*\*?(?:\s*\[[^]]*\]){0,2}\s*{[^}]*|(?:\w*cites|Cites)(?:\s*\([^)]*\)){0,2}(?:(?:\s*\[[^]]*\]){0,2}\s*\{[^}]*\})*(?:\s*\[[^]]*\]){0,2}\s*\{[^}]*|bibentry\s*{[^}]*|(text|block)cquote\*?(?:\s*\[[^]]*\]){0,2}\s*{[^}]*
|(for|hy)\w*cquote\*?{[^}]*}(?:\s*\[[^]]*\]){0,2}\s*{[^}]*|defbibentryset{[^}]*}{[^}]*|\w*ref(?:\s*\{[^}]*|range\s*\{[^,}]*(?:}{)?)|hyperref\s*\[[^]]*|includegraphics\*?(?:\s*\[[^]]*\]){0,2}\s*\{[^}]*|(?:include(?:only)?|input|subfile)\
s*\{[^}]*|([cpdr]?(gls|Gls|GLS)|acr|Acr|ACR)[a-zA-Z]*\s*\{[^}]*|(ac|Ac|AC)\s*\{[^}]*|includepdf(\s*\[[^]]*\])?\s*\{[^}]*|includestandalone(\s*\[[^]]*\])?\s*\{[^}]*|(usepackage|RequirePackage|PassOptionsToPackage)(\s*\[[^]]*\])?\s*\{[^}]
*|documentclass(\s*\[[^]]*\])?\s*\{[^}]*|begin(\s*\[[^]]*\])?\s*\{[^}]*|end(\s*\[[^]]*\])?\s*\{[^}]*|\w*)
chemzqm commented 2 years ago

The vimtex plugin not exists in your vim's rtp for some reason, it's expected result. You may need to configure coc.source.vimtex.filetypes

lamabro23 commented 2 years ago

I put this in my coc-settings.json when I started using this extension (and it was working until not):

"coc.source.vimtex.filetypes": [ "tex", "plaintex", "latex" ]

I tried to remove all but the tex extension from that, but no change.

When I run :echo &rtp, the returned string contains the path to vimtex as well.

Is there some change in the newer updates that could cause this behavior?