I'm having an issue with coc.nvim and coc-vimtex in Vim/Neovim. I only want coc.nvim to work with Python and LaTex files, but coc-vimtex is not providing autocompletion for LaTex. Here's what I've tried so far:
Configuration to Enable coc.nvim Only for Python and LaTex
I have configured my .vimrc to enable coc.nvim only for Python and LaTex files using the following autocommands:
autocmd FileType python,tex let b:coc_enabled = 1 autocmd FileType * if &filetype !=# 'python' && &filetype !=# 'tex' | let b:coc_enabled = 0 | endif
Steps Taken
Installed coc.nvim and coc-vimtex:
I installed coc-vimtex using :CocInstall coc-vimtex.
I checked with :CocList extensions, and coc-vimtex is listed.
Configured coc-settings.json:
I set coc.source.vimtex.enable to true.
I also added 'tex' and other file types to coc.source.vimtex.filetypes.
Restarted Vim/Neovim:
I restarted Vim/Neovim multiple times to apply the changes.
Tested LaTex Autocompletion:
I tried typing common LaTex commands like \begin or \section, but I didn't get any LaTex-specific autocompletion.
Diagnostics:
I used :CocDiagnostics, but there is nothing on the new buffer
I checked :CocCommand workspace.showOutput, but nothing related to coc-vimtex appeared.
Verified vimtex:
Commands like :VimtexCompile work, suggesting that vimtex is functioning properly.
Reinstalled coc-vimtex:
I tried uninstalling and reinstalling coc-vimtex, but it didn't resolve the problem.
Why might coc-vimtex not be providing LaTex-specific autocompletion?
Is there something I might have missed in my configuration or setup?
Any suggestions on additional steps to troubleshoot or fix this issue?
I have acces to coc in tex file but no autocompletion base with doc-vimtex only on my last word I write like basic coc use
when I do :CocList sources
around|[A]||1| |uffer|[B]||1| |ile|[F]||10| |python-import|[PY]||99 python| |pyright|[LS]|
so nothing about latex
I appreciate any help or advice you can offer. Thanks in advance!
I'm having an issue with coc.nvim and coc-vimtex in Vim/Neovim. I only want coc.nvim to work with Python and LaTex files, but coc-vimtex is not providing autocompletion for LaTex. Here's what I've tried so far:
Configuration to Enable coc.nvim Only for Python and LaTex
I have configured my .vimrc to enable coc.nvim only for Python and LaTex files using the following autocommands:
autocmd FileType python,tex let b:coc_enabled = 1 autocmd FileType * if &filetype !=# 'python' && &filetype !=# 'tex' | let b:coc_enabled = 0 | endif
Steps Taken
Installed coc.nvim and coc-vimtex:
I installed coc-vimtex using
:CocInstall coc-vimtex
. I checked with:CocList extensions
, and coc-vimtex is listed. Configured coc-settings.json:I set coc.source.vimtex.enable to true. I also added 'tex' and other file types to coc.source.vimtex.filetypes. Restarted Vim/Neovim:
I restarted Vim/Neovim multiple times to apply the changes. Tested LaTex Autocompletion:
I tried typing common LaTex commands like \begin or \section, but I didn't get any LaTex-specific autocompletion. Diagnostics:
I used :CocDiagnostics, but there is nothing on the new buffer I checked
:CocCommand workspace.showOutput
, but nothing related to coc-vimtex appeared. Verified vimtex:Commands like :VimtexCompile work, suggesting that vimtex is functioning properly. Reinstalled coc-vimtex:
I tried uninstalling and reinstalling coc-vimtex, but it didn't resolve the problem. Why might coc-vimtex not be providing LaTex-specific autocompletion? Is there something I might have missed in my configuration or setup? Any suggestions on additional steps to troubleshoot or fix this issue? I have acces to coc in tex file but no autocompletion base with doc-vimtex only on my last word I write like basic coc use when I do :CocList sources
around|[A]||1| |uffer|[B]||1| |ile|[F]||10| |python-import|[PY]||99 python| |pyright|[LS]| so nothing about latex
I appreciate any help or advice you can offer. Thanks in advance!