summaryrefslogtreecommitdiff
path: root/autoload/ale/fixers/stylua.vim
blob: 3521c9357c8ec31853f74862f10f971dfae87091 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
" Author: Robert Liebowitz <rliebz@gmail.com>
" Description: https://github.com/johnnymorganz/stylua

call ale#Set('lua_stylua_executable', 'stylua')
call ale#Set('lua_stylua_options', '')

function! ale#fixers#stylua#Fix(buffer) abort
    let l:executable = ale#Var(a:buffer, 'lua_stylua_executable')
    let l:options = ale#Var(a:buffer, 'lua_stylua_options')

    return {
    \   'command': ale#Escape(l:executable) . ale#Pad(l:options) . ' -',
    \}
endfunction