mirror of
1
0
Fork 0
ultimate-vim/sources_non_forked/ale/autoload/ale/fixers/refmt.vim

19 lines
578 B
VimL

" Author: Ahmed El Gabri <@ahmedelgabri>
" Description: Integration of refmt with ALE.
call ale#Set('reasonml_refmt_executable', 'refmt')
call ale#Set('reasonml_refmt_options', '')
function! ale#fixers#refmt#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'reasonml_refmt_executable')
let l:options = ale#Var(a:buffer, 'reasonml_refmt_options')
return {
\ 'command': ale#Escape(l:executable)
\ . (empty(l:options) ? '' : ' ' . l:options)
\ . ' --in-place'
\ . ' %t',
\ 'read_temporary_file': 1,
\}
endfunction