9fe7b1fe6a
Working directories are now set seperately from the commands so they can later be swapped out when running linters over projects is supported, and also better support filename mapping for running linters on other machines in future.
20 lines
644 B
VimL
20 lines
644 B
VimL
" Author: Eric Wolf <ericwolf42@gmail.com>
|
|
" Description: ghc for Haskell files called with cabal exec
|
|
|
|
call ale#Set('haskell_cabal_ghc_options', '-fno-code -v0')
|
|
|
|
function! ale_linters#haskell#cabal_ghc#GetCommand(buffer) abort
|
|
return 'cabal exec -- ghc '
|
|
\ . ale#Var(a:buffer, 'haskell_cabal_ghc_options')
|
|
\ . ' %t'
|
|
endfunction
|
|
|
|
call ale#linter#Define('haskell', {
|
|
\ 'name': 'cabal_ghc',
|
|
\ 'aliases': ['cabal-ghc'],
|
|
\ 'output_stream': 'stderr',
|
|
\ 'executable': 'cabal',
|
|
\ 'cwd': '%s:h',
|
|
\ 'command': function('ale_linters#haskell#cabal_ghc#GetCommand'),
|
|
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
|
|
\})
|