mirror of
https://github.com/dense-analysis/ale.git
synced 2026-05-16 05:28:33 +08:00
916c8764ce
CI / Build (push) Waiting to run
CI / Lint (push) Blocked by required conditions
CI / Lua (push) Blocked by required conditions
CI / Neovim 0.10 Linux (push) Blocked by required conditions
CI / Neovim 0.12 Linux (push) Blocked by required conditions
CI / Vim 8.2 Linux (push) Blocked by required conditions
CI / Vim 9.2 Linux (push) Blocked by required conditions
CI / Neovim 0.10 Windows (push) Waiting to run
CI / Neovim 0.12 Windows (push) Waiting to run
CI / Vim 8.2 Windows (push) Waiting to run
CI / Vim 9.2 Windows (push) Waiting to run
* Support for tex-fmt Support for tex-fmt, https://github.com/WGUNDERWOOD/tex-fmt. * Remove file type plaintex Remove file type plaintex as tex-fmt is solely for LaTeX. See https://superuser.com/questions/208177/vim-and-tex-filetypes-plaintex-vs-tex for a distinction.
21 lines
606 B
VimL
21 lines
606 B
VimL
" Author: https://github.com/Spixmaster
|
|
" Description: Fix LaTeX and bibliography files with tex-fmt.
|
|
|
|
call ale#Set('tex_tex_fmt_executable', 'tex-fmt')
|
|
call ale#Set('tex_tex_fmt_use_global', get(g:, 'ale_use_global_executables', 0))
|
|
call ale#Set('tex_tex_fmt_options', '')
|
|
|
|
function! ale#fixers#tex_fmt#Fix(buffer) abort
|
|
let l:executable = ale#python#FindExecutable(
|
|
\ a:buffer,
|
|
\ 'tex_tex_fmt',
|
|
\ ['tex-fmt']
|
|
\)
|
|
|
|
let l:options = ale#Var(a:buffer, 'tex_tex_fmt_options')
|
|
|
|
return {
|
|
\ 'command': ale#Escape(l:executable) . ' ' . l:options . ' -s',
|
|
\}
|
|
endfunction
|