1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-04 05:50:06 +08:00
SpaceVim/bundle/ale/ale_linters/haskell/cabal_ghc.vim

21 lines
644 B
VimL
Raw Normal View History

2021-02-10 10:31:34 +08:00
" 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
2023-06-09 12:10:45 +08:00
return 'cabal exec -- ghc '
2021-02-10 10:31:34 +08:00
\ . 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',
2023-06-09 12:10:45 +08:00
\ 'cwd': '%s:h',
2021-02-10 10:31:34 +08:00
\ 'command': function('ale_linters#haskell#cabal_ghc#GetCommand'),
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
\})