When I open new .tex files, I get this warning: vimtex warning: Can't use callbacks with empty v:servername. How can I disable it?
After updating vimtex plugin, I get the same error when I run compile command (i.e., \ll).
This warning appears if you try to compile and the callback feature is enabled, but v:servername is not set. This occurs if you run vim in a terminal without the --servername NAME option.
You need to either:
let g:vimtex_compiler_latexmk = {'callback' : 0}, orRead more about this:
:help g:vimtex_compiler_latexmk:help vimtex-requirements (section about the clientserver):help clientserver@lervag, Clarification question: Does disabling callback with {'callback': 0} disable the "callback" you get from a job exiting created with job_start? When I use vimtex, it seems that it is possible to have background compilation _without_ client-server using jobs .. although the documentation suggests otherwise.
Disabling callback disables the latexmk callbacks after failed/successful compilations. It has nothing to do with the job_start callback feature.
You can have background "single-shot" compilation with an exit callback from job_start that will check for errors after compilation. This should work regardless of the clientserver and v:servername, but obv. requires Vim 8.
Thus: The confusion is that there are two types of callbacks. The ones from the Vim job handler, and the ones from latexmk. The callback option refers to the latexmk callbacks, not the Vim job handler.
Thanks for the explanation!
No problem :)
Most helpful comment
This warning appears if you try to compile and the callback feature is enabled, but
v:servernameis not set. This occurs if you run vim in a terminal without the--servername NAMEoption.You need to either:
let g:vimtex_compiler_latexmk = {'callback' : 0}, or