Add support for sqlfmt

This commit is contained in:
LEI committed 2018-09-08 01:34:10 +02:00
1 parent 0ae4ea23c8
commit a97ef49c51
6 files changed
+73 -2

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
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