adds fixer support for hfmt (#1027)

Add support for fixing Haskell with hfmt
This commit is contained in:
Zack Kourouma authored and w0rp committed 2017-10-24 22:29:04 +01:00
1 parent b172cd8b17
commit 07dad64acb
6 files changed
+58 -2

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
" Author: zack <zack@kourouma.me>
" Description: Integration of hfmt with ALE.
call ale#Set('haskell_hfmt_executable', 'hfmt')
function! ale#fixers#hfmt#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'haskell_hfmt_executable')
return {
\ 'command': ale#Escape(l:executable)
\ . ' -w'
\ . ' %t',
\ 'read_temporary_file': 1,
\}
endfunction