1
0
Fork 0
mirror of synced 2024-05-28 21:11:12 -04:00
ultimate-vim/sources_non_forked/ale/autoload/ale/fixers/appleswiftformat.vim
2021-05-05 10:25:00 +02:00

17 lines
540 B
VimL

" Author: (bosr) <bosr@bosr.cc>
" Description: Integration of apple/swift-format formatter with ALE.
function! ale#fixers#appleswiftformat#Fix(buffer) abort
let l:command_args = ale#swift#GetAppleSwiftFormatCommand(a:buffer) . ' format --in-place %t'
let l:config_args = ale#swift#GetAppleSwiftFormatConfigArgs(a:buffer)
if l:config_args isnot# ''
let l:command_args = l:command_args . ' ' . l:config_args
endif
return {
\ 'read_temporary_file': 1,
\ 'command': l:command_args,
\}
endfunction