1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-17 21:25:45 +08:00
2021-02-10 10:31:34 +08:00

14 lines
414 B
VimL
Vendored

call ale#Set('sql_sqlfmt_executable', 'sqlfmt')
call ale#Set('sql_sqlfmt_options', '')
function! ale#fixers#sqlfmt#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'sql_sqlfmt_executable')
let l:options = ale#Var(a:buffer, 'sql_sqlfmt_options')
return {
\ 'command': ale#Escape(l:executable)
\ . ' -w'
\ . (empty(l:options) ? '' : ' ' . l:options),
\}
endfunction