summaryrefslogtreecommitdiff
path: root/autoload/ale/fixers/erbformatter.vim
blob: 7bb43e0c4bdf4da91a3f3ad87ad30670622228b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
" Author: Arash Mousavi <arash-m>
" Description: Support for ERB::Formetter https://github.com/nebulab/erb-formatter

call ale#Set('eruby_erbformatter_executable', 'erb-formatter')

function! ale#fixers#erbformatter#Fix(buffer) abort
    let l:executable = ale#Var(a:buffer, 'eruby_erbformatter_executable')

    return {
    \   'command': ale#Escape(l:executable) . ' -w %t',
    \   'read_temporary_file': 1,
    \}
endfunction