parent
596a374c6e
commit
94842a257e
1 changed files with 14 additions and 1 deletions
|
@ -22,11 +22,16 @@ function! ale_linters#haskell#ghc#Handle(buffer, lines)
|
|||
for line in a:lines
|
||||
if len(matchlist(line, pattern)) > 0
|
||||
call add(corrected_lines, line)
|
||||
call add(corrected_lines, '')
|
||||
if line !~ ': error:$'
|
||||
call add(corrected_lines, '')
|
||||
endif
|
||||
elseif line == ''
|
||||
call add(corrected_lines, line)
|
||||
else
|
||||
if len(corrected_lines) > 0
|
||||
if corrected_lines[-1] =~ ': error:$'
|
||||
let line = substitute(line, '\v^\s+', ' ', '')
|
||||
endif
|
||||
let corrected_lines[-1] .= line
|
||||
endif
|
||||
endif
|
||||
|
@ -60,3 +65,11 @@ call ALEAddLinter('haskell', {
|
|||
\ 'command': g:ale#util#stdin_wrapper . ' .hs ghc -fno-code -v0',
|
||||
\ 'callback': 'ale_linters#haskell#ghc#Handle',
|
||||
\})
|
||||
|
||||
call ALEAddLinter('haskell', {
|
||||
\ 'name': 'stack-ghc',
|
||||
\ 'output_stream': 'stderr',
|
||||
\ 'executable': 'stack',
|
||||
\ 'command': g:ale#util#stdin_wrapper . ' .hs stack ghc -- -fno-code -v0',
|
||||
\ 'callback': 'ale_linters#haskell#ghc#Handle',
|
||||
\})
|
||||
|
|
Reference in a new issue