diff options
Diffstat (limited to 'autoload/ale/fixers/hlint.vim')
-rw-r--r-- | autoload/ale/fixers/hlint.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/autoload/ale/fixers/hlint.vim b/autoload/ale/fixers/hlint.vim new file mode 100644 index 00000000..94dd736e --- /dev/null +++ b/autoload/ale/fixers/hlint.vim @@ -0,0 +1,16 @@ +" Author: eborden <evan@evan-borden.com> +" Description: Integration of hlint refactor with ALE. +" +call ale#Set('haskell_hlint_executable', 'hlint') + +function! ale#fixers#hlint#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'haskell_hlint_executable') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' --refactor' + \ . ' --refactor-options="--inplace"' + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction |