mirror of
https://github.com/amix/vimrc
synced 2025-08-07 22:35:01 +08:00
Updated plugins
This commit is contained in:
20
sources_non_forked/ale/autoload/ale/fixers/css_beautify.vim
Normal file
20
sources_non_forked/ale/autoload/ale/fixers/css_beautify.vim
Normal file
@ -0,0 +1,20 @@
|
||||
" Author: https://github.com/Spixmaster
|
||||
" Description: Format CSS using css-beautify from js-beautify.
|
||||
|
||||
call ale#Set('css_css_beautify_executable', 'css-beautify')
|
||||
call ale#Set('css_css_beautify_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('css_css_beautify_options', '')
|
||||
|
||||
function! ale#fixers#css_beautify#Fix(buffer) abort
|
||||
let l:executable = ale#python#FindExecutable(
|
||||
\ a:buffer,
|
||||
\ 'css_css_beautify',
|
||||
\ ['css-beautify']
|
||||
\)
|
||||
|
||||
let l:options = ale#Var(a:buffer, 'css_css_beautify_options')
|
||||
|
||||
return {
|
||||
\ 'command': ale#Escape(l:executable) . ' ' . l:options . ' -',
|
||||
\}
|
||||
endfunction
|
@ -1,10 +1,9 @@
|
||||
" Author: WhyNotHugo <hugo@barrera.io>
|
||||
" Description: Lint HTML files with html-beautify.
|
||||
"
|
||||
" Description: Format HTML files with html-beautify.
|
||||
|
||||
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', '')
|
||||
call ale#Set('html_beautify_change_directory', 1)
|
||||
|
||||
function! ale#fixers#html_beautify#Fix(buffer) abort
|
||||
let l:executable = ale#python#FindExecutable(
|
||||
@ -16,6 +15,6 @@ function! ale#fixers#html_beautify#Fix(buffer) abort
|
||||
let l:options = ale#Var(a:buffer, 'html_beautify_options')
|
||||
|
||||
return {
|
||||
\ 'command': ale#Escape(l:executable). ' ' . l:options . ' -',
|
||||
\ 'command': ale#Escape(l:executable) . ' ' . l:options . ' -',
|
||||
\}
|
||||
endfunction
|
||||
|
Reference in New Issue
Block a user