aboutsummaryrefslogtreecommitdiff
path: root/.vim/autoload/neomake/makers/ft/tex.vim
blob: 9fca53be72c79f4622bcab40e876d38c1c19fd92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
" vim: ts=4 sw=4 et

function! neomake#makers#ft#tex#EnabledMakers() abort
    return ['chktex', 'lacheck', 'rubberinfo', 'proselint']
endfunction

function! neomake#makers#ft#tex#chktex() abort
    let maker = {
                \ 'args': [],
                \ 'errorformat':
                \ '%EError %n in %f line %l: %m,' .
                \ '%WWarning %n in %f line %l: %m,' .
                \ '%WMessage %n in %f line %l: %m,' .
                \ '%Z%p^,' .
                \ '%-G%.%#'
                \ }
    let rcfile = neomake#utils#FindGlobFile('.chktexrc')
    if !empty(rcfile)
        let maker.args += ['-l', fnamemodify(rcfile, ':h')]
    endif
    return maker
endfunction

function! neomake#makers#ft#tex#lacheck() abort
    return {
                \ 'errorformat':
                \ '%-G** %f:,' .
                \ '%E"%f"\, line %l: %m'
                \ }
endfunction

function! neomake#makers#ft#tex#rubber() abort
    return {
                \ 'args': ['--pdf', '-f', '--warn=all'],
                \ 'errorformat':
                \ '%f:%l: %m,' .
                \ '%f: %m'
                \ }
endfunction

function! neomake#makers#ft#tex#rubberinfo() abort
    return {
                \ 'exe': 'rubber-info',
                \ 'errorformat':
                \ '%f:%l: %m,' .
                \ '%f:%l-%\d%\+: %m,' .
                \ '%f: %m'
                \ }
endfunction

function! neomake#makers#ft#tex#latexrun() abort
    return {
                \ 'args': ['--color', 'never'],
                \ 'errorformat':
                \ '%f:%l: %m'
                \ }
endfunction

function! neomake#makers#ft#tex#pdflatex() abort
    return {
                \ 'exe': 'pdflatex',
                \ 'args': ['-shell-escape', '-file-line-error', '-interaction', 'nonstopmode'],
                \ 'errorformat': '%E%f:%l: %m'
                \ }
endfunction

function! neomake#makers#ft#tex#proselint() abort
    return neomake#makers#ft#text#proselint()
endfunction