1
0
Fork 0
mirror of synced 2024-11-12 20:28:58 -05:00
ultimate-vim/sources_non_forked/ale/ale_linters/ruby/ruby.vim
2018-03-31 11:55:20 -03:00

22 lines
734 B
VimL

" Author: Brandon Roehl - https://github.com/BrandonRoehl
" Description: Ruby MRI for Ruby files
call ale#Set('ruby_ruby_executable', 'ruby')
function! ale_linters#ruby#ruby#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'ruby_ruby_executable')
endfunction
function! ale_linters#ruby#ruby#GetCommand(buffer) abort
let l:executable = ale_linters#ruby#ruby#GetExecutable(a:buffer)
return ale#Escape(l:executable) . ' -w -c -T1 %t'
endfunction
call ale#linter#Define('ruby', {
\ 'name': 'ruby',
\ 'executable_callback': 'ale_linters#ruby#ruby#GetExecutable',
\ 'command_callback': 'ale_linters#ruby#ruby#GetCommand',
\ 'output_stream': 'stderr',
\ 'callback': 'ale#handlers#ruby#HandleSyntaxErrors',
\})