mirror of
https://github.com/dense-analysis/ale.git
synced 2026-05-16 05:28:33 +08:00
Support for tex-fmt (#5127)
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
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.
This commit is contained in:
committed by
GitHub
parent
641294465e
commit
916c8764ce
@@ -777,6 +777,11 @@ let s:default_registry = {
|
||||
\ 'suggested_filetypes': ['markdown'],
|
||||
\ 'description': 'Fix markdown files with rumdl.',
|
||||
\ },
|
||||
\ 'tex-fmt': {
|
||||
\ 'function': 'ale#fixers#tex_fmt#Fix',
|
||||
\ 'suggested_filetypes': ['bib', 'tex'],
|
||||
\ 'description': 'Fix LaTeX and bibliography files with tex-fmt.',
|
||||
\ }
|
||||
\}
|
||||
|
||||
" Reset the function registry to the default entries.
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
" 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
|
||||
Reference in New Issue
Block a user