add pgformatter

This commit is contained in:
Sajjad Hashemian
2019-05-27 09:00:11 +04:30
parent bb08b81bf7
commit 8d8b295ef5
7 changed files with 62 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
call ale#Set('sql_pgformatter_executable', 'pg_format')
call ale#Set('sql_pgformatter_options', '')
function! ale#fixers#pgformatter#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'sql_pgformatter_executable')
let l:options = ale#Var(a:buffer, 'sql_pgformatter_options')
return {
\ 'command': ale#Escape(l:executable)
\ . (empty(l:options) ? '' : ' ' . l:options),
\}
endfunction