summaryrefslogtreecommitdiff
path: root/autoload/ale/fixers/latexindent.vim
blob: 54f1231e6c761b2778208ce6848f172979da1d54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
" Author: riley-martine <riley.martine@protonmail.com>
" Description: Integration of latexindent with ALE.

call ale#Set('tex_latexindent_executable', 'latexindent')
call ale#Set('tex_latexindent_options', '')

function! ale#fixers#latexindent#Fix(buffer) abort
    let l:executable = ale#Var(a:buffer, 'tex_latexindent_executable')
    let l:options = ale#Var(a:buffer, 'tex_latexindent_options')

    return {
    \   'command': ale#Escape(l:executable)
    \       . ' -l'
    \       . (empty(l:options) ? '' : ' ' . l:options)
    \}
endfunction