1
0
Fork 0
mirror of synced 2024-11-16 14:05:34 -05:00
ultimate-vim/sources_non_forked/ale/autoload/ale/fixers/purty.vim

23 lines
573 B
VimL
Raw Normal View History

2019-11-16 10:28:42 -05:00
" Author: iclanzan <sorin@iclanzan.com>
" Description: Integration of purty with ALE.
call ale#Set('purescript_purty_executable', 'purty')
function! ale#fixers#purty#GetExecutable(buffer) abort
let l:executable = ale#Var(a:buffer, 'purescript_purty_executable')
return ale#Escape(l:executable)
endfunction
function! ale#fixers#purty#Fix(buffer) abort
let l:executable = ale#fixers#purty#GetExecutable(a:buffer)
return {
\ 'command': l:executable
\ . ' --write'
\ . ' %t',
\ 'read_temporary_file': 1,
\}
endfunction