Closed
Description
Describe the issue
Upon omni completion, various errors pop up, depending on my setup. In the test script below, it's
E121: Undefined variable: g:vimtex_complete_close_braces
. The issue is that vimtex#init()
is not called.
$ nvim --version
NVIM v0.4.0-887-g69b3d5acd
Build type: RelWithDebInfo
Features: +acl +iconv +tui
$ uname --kernel-release
5.1.12-arch1-1-ARCH
health#vimtex#check
========================================================================
## vimtex
- OK: Vim version should have full support!
- OK: General viewer should work properly!
- WARNING: Compiler callbacks will not work!
- ADVICE:
- `neovim-remote` / `nvr` is required for callbacks to work with neovim
- Please also set |g:vimtex_compiler_progname| = 'nvr'
Steps to reproduce
I keep the vimtex repo in ~/.local/share/nvim/site/pack/github/start
, managed with minpac. Run the below script, and try omni completion.
#!/bin/sh
tmpdir=$(mktemp -d)
trap "rm -rf $tmpdir; exit 1" INT TERM
nvdir=${tmpdir}/nvim
pack=~/.local/share/nvim/site/pack/github/start
mkdir -p ${nvdir}/ftplugin
cat <<VIMRC > ${nvdir}/init.vim
set nocompatible
set runtimepath=/usr/share/nvim/runtime,${nvdir},${pack}/vimtex,${pack}/vimtex/after
filetype plugin indent on
syntax enable
packadd vimtex
VIMRC
cat <<FT > ${nvdir}/ftplugin/tex.vim
setl omnifunc=vimtex#complete#omnifunc
FT
cat <<FILE > ${nvdir}/file.tex
%! TEX root
\documentclass{myarticle}
\begin{document}
% type some tex command and complete with CTRL-X CTRL-O
% try :echo b:vimtex
\end{document}
FILE
nvim --noplugin --clean -n -u ${nvdir}/init.vim ${nvdir}/file.tex
I probably overlooked something...