summaryrefslogtreecommitdiff
path: root/autoload/ale/fixers/rustywind.vim
blob: 5e9bb3c5a9d1c7b5e0b0bfeb8759bb48f448fcd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
scriptencoding utf-8
" Author: Guillermo Roig <groig@protonmail.com>
" Description: Sort TailwindCSS classes with rustywind

call ale#Set('html_rustywind_executable', 'rustywind')
call ale#Set('html_rustywind_options', '')

function! ale#fixers#rustywind#Fix(buffer) abort
    let l:executable = ale#Var(a:buffer, 'html_rustywind_executable')
    let l:options = ale#Var(a:buffer, 'html_rustywind_options')

    return {
    \   'command': ale#Escape(l:executable)
    \       . (empty(l:options) ? '' : ' ' . l:options)
    \       . ' --stdin'
    \}
endfunction