Add hlint refactoring as a fixer (#1836)

This commit is contained in:
Evan Borden authored and w0rp committed 2018-08-23 23:23:54 +01:00
1 parent 2600524274
commit 707b539969
5 files changed
+57

No files matched your search

+16
View File
@@ -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