1
0
Fork 0
mirror of synced 2024-06-14 13:01:12 -04:00
ultimate-vim/sources_non_forked/ale/autoload/ale/fixers/rubyfmt.vim

17 lines
506 B
VimL
Raw Normal View History

2024-02-11 12:33:58 -05:00
" Author: Yining <zhang.yining@gmail.com>
" Description: support rubyfmt as ALE fixer for Ruby files
call ale#Set('ruby_rubyfmt_executable', 'rubyfmt')
call ale#Set('ruby_rubyfmt_options', '')
function! ale#fixers#rubyfmt#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'ruby_rubyfmt_executable')
let l:options = ale#Var(a:buffer, 'ruby_rubyfmt_options')
return {
\ 'command': ale#Escape(l:executable)
\ . (empty(l:options) ? '' : ' ' . l:options)
\}
endfunction