1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-03 10:50:31 +08:00
2021-02-10 10:31:34 +08:00

23 lines
723 B
VimL
Vendored

" Author: eborden <evan@evan-borden.com>, ifyouseewendy <ifyouseewendy@gmail.com>, aspidiets <emarshall85@gmail.com>
" Description: Integration of brittany with ALE.
call ale#Set('haskell_brittany_executable', 'brittany')
function! ale#fixers#brittany#GetExecutable(buffer) abort
let l:executable = ale#Var(a:buffer, 'haskell_brittany_executable')
return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'brittany')
endfunction
function! ale#fixers#brittany#Fix(buffer) abort
let l:executable = ale#fixers#brittany#GetExecutable(a:buffer)
return {
\ 'command': l:executable
\ . ' --write-mode inplace'
\ . ' %t',
\ 'read_temporary_file': 1,
\}
endfunction