X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/ale_linters/haskell/cabal_ghc.vim diff --git a/.vim/bundle/ale/ale_linters/haskell/cabal_ghc.vim b/.vim/bundle/ale/ale_linters/haskell/cabal_ghc.vim new file mode 100644 index 00000000..1bb31ebb --- /dev/null +++ b/.vim/bundle/ale/ale_linters/haskell/cabal_ghc.vim @@ -0,0 +1,20 @@ +" Author: Eric Wolf +" 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', +\})