mirror of
https://github.com/dense-analysis/ale.git
synced 2026-11-19 02:01:03 +08:00
Merge pull request #1897 from LEI/add-sqlfmt-fixer
Add support for sqlfmt
This commit is contained in:
6 files changed
+73
-2
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user