2017-07-24 04:36:28 +00:00
|
|
|
" Author: rob-b, Takano Akio <tak@anoak.io>
|
2017-02-14 22:47:53 +00:00
|
|
|
" Description: hdevtools for Haskell files
|
|
|
|
|
2017-07-24 04:36:28 +00:00
|
|
|
call ale#Set('haskell_hdevtools_executable', 'hdevtools')
|
2018-04-07 21:50:26 +00:00
|
|
|
call ale#Set('haskell_hdevtools_options', get(g:, 'hdevtools_options', '-g -Wall'))
|
2017-07-24 04:36:28 +00:00
|
|
|
|
|
|
|
function! ale_linters#haskell#hdevtools#GetCommand(buffer) abort
|
2018-09-28 08:05:01 +00:00
|
|
|
let l:executable = ale#Var(a:buffer, 'haskell_hdevtools_executable')
|
|
|
|
|
|
|
|
return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'hdevtools')
|
|
|
|
\ . ' check' . ale#Pad(ale#Var(a:buffer, 'haskell_hdevtools_options'))
|
2018-08-02 22:44:12 +00:00
|
|
|
\ . ' -p %s %t'
|
2017-07-24 04:36:28 +00:00
|
|
|
endfunction
|
|
|
|
|
2017-02-14 22:47:53 +00:00
|
|
|
call ale#linter#Define('haskell', {
|
|
|
|
\ 'name': 'hdevtools',
|
2019-02-22 18:05:04 +00:00
|
|
|
\ 'executable': {b -> ale#Var(b, 'haskell_hdevtools_executable')},
|
|
|
|
\ 'command': function('ale_linters#haskell#hdevtools#GetCommand'),
|
2017-04-24 21:27:18 +00:00
|
|
|
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
|
2017-02-14 22:47:53 +00:00
|
|
|
\})
|