add pgformatter

This commit is contained in:
Sajjad Hashemian committed 2019-05-27 09:00:11 +04:30
1 parent bb08b81bf7
commit 8d8b295ef5
7 files changed
+62

No files matched your search

+12
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