Files
ale/autoload/ale/fixers/tex_fmt.vim
T
Matheus Gabriel Werny 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 (#5127)
* 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.
2026-05-14 23:00:05 +01:00

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