-
Notifications
You must be signed in to change notification settings - Fork 407
Improve generic compiler backend #2021
Copy link
Copy link
Closed
Labels
Description
The generic compiler backend was added after discussion in #1898. See also slightly related issue #1797. For convenience, this is a list of things to improve:
- Allow callback hooks similar to the latexmk backend.
- Documentation:
- Ensure proper documentation; see e.g. the
hookskey in help text forg:vimtex_compiler_latexmk. - Add configuration examples to section
vimtex-compiler-generic. - Extra: Use more consistent section names like
vimtex-compiler-latexmkandvimtex-compiler-generic.
- Ensure proper documentation; see e.g. the
Callback hook
function! MyCustomCallback(msg) abort
if condition(a:msg)
call vimtex#compiler#callback(!vimtex#qf#inquire(b:vimtex.tex))
endif
endfunction
let g:vimtex_compiler_generic = {
\ 'cmd': 'ls *.tex | entr -c tectonic /_ --synctex --keep-logs',
\ 'hooks': [function('MyCustomCallback')],
\}Examples
let g:vimtex_compiler_method='generic'
" Tectonic does not do continuous compilation, so this may work as
" a custom continuous version
let g:vimtex_compiler_generic = {
\ 'cmd': 'ls *.tex | entr -c tectonic /_ --synctex --keep-logs',
\}
" This is not really useful, but serves as an example
let g:vimtex_compiler_generic = {
\ 'cmd': 'ls *.tex | entr -c latexmk',
\}
" Makefile based workflow
let g:vimtex_compiler_generic = {
\ 'cmd': 'make',
\}Reactions are currently unavailable