mirror of
1
0
Fork 0
ultimate-vim/sources_non_forked/ale/autoload/ale/fixers/html_beautify.vim

21 lines
623 B
VimL
Raw Normal View History

2019-11-16 10:28:42 -05:00
" Author: WhyNotHugo <hugo@barrera.io>
2022-10-15 15:05:32 -04:00
" Description: Format HTML files with html-beautify.
2019-11-16 10:28:42 -05:00
call ale#Set('html_beautify_executable', 'html-beautify')
call ale#Set('html_beautify_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('html_beautify_options', '')
function! ale#fixers#html_beautify#Fix(buffer) abort
let l:executable = ale#python#FindExecutable(
\ a:buffer,
\ 'html_beautify',
\ ['html-beautify']
\)
let l:options = ale#Var(a:buffer, 'html_beautify_options')
return {
2022-10-15 15:05:32 -04:00
\ 'command': ale#Escape(l:executable) . ' ' . l:options . ' -',
2019-11-16 10:28:42 -05:00
\}
endfunction