2018-03-31 10:55:20 -04:00
|
|
|
" Author: rob-b, Takano Akio <tak@anoak.io>
|
|
|
|
" Description: hdevtools for Haskell files
|
|
|
|
|
|
|
|
call ale#Set('haskell_hdevtools_executable', 'hdevtools')
|
2018-06-14 06:31:12 -04:00
|
|
|
call ale#Set('haskell_hdevtools_options', get(g:, 'hdevtools_options', '-g -Wall'))
|
2018-03-31 10:55:20 -04:00
|
|
|
|
|
|
|
function! ale_linters#haskell#hdevtools#GetCommand(buffer) abort
|
2018-08-25 12:13:42 -04:00
|
|
|
return '%e check' . ale#Pad(ale#Var(a:buffer, 'haskell_hdevtools_options'))
|
|
|
|
\ . ' -p %s %t'
|
2018-03-31 10:55:20 -04:00
|
|
|
endfunction
|
|
|
|
|
|
|
|
call ale#linter#Define('haskell', {
|
|
|
|
\ 'name': 'hdevtools',
|
2018-08-25 12:13:42 -04:00
|
|
|
\ 'executable_callback': ale#VarFunc('haskell_hdevtools_executable'),
|
2018-03-31 10:55:20 -04:00
|
|
|
\ 'command_callback': 'ale_linters#haskell#hdevtools#GetCommand',
|
|
|
|
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
|
|
|
|
\})
|