1
0
Fork 0
mirror of synced 2024-05-28 13:01:12 -04:00
ultimate-vim/sources_non_forked/ale/autoload/ale/fixers/dartfmt.vim
Amir Salihefendic 2f164fee9b Updated plugins
2018-07-04 12:53:25 +02:00

19 lines
565 B
VimL

" Author: reisub0 <reisub0@gmail.com>
" Description: Integration of dartfmt with ALE.
call ale#Set('dart_dartfmt_executable', 'dartfmt')
call ale#Set('dart_dartfmt_options', '')
function! ale#fixers#dartfmt#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'dart_dartfmt_executable')
let l:options = ale#Var(a:buffer, 'dart_dartfmt_options')
return {
\ 'command': ale#Escape(l:executable)
\ . ' -w'
\ . (empty(l:options) ? '' : ' ' . l:options)
\ . ' %t',
\ 'read_temporary_file': 1,
\}
endfunction