summaryrefslogtreecommitdiff
path: root/ale_linters/haskell
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/haskell')
-rw-r--r--ale_linters/haskell/ghc.vim10
1 files changed, 9 insertions, 1 deletions
diff --git a/ale_linters/haskell/ghc.vim b/ale_linters/haskell/ghc.vim
index fdf22f9f..daf91c8f 100644
--- a/ale_linters/haskell/ghc.vim
+++ b/ale_linters/haskell/ghc.vim
@@ -1,10 +1,18 @@
" Author: w0rp <devw0rp@gmail.com>
" Description: ghc for Haskell files
+call ale#Set('haskell_ghc_options', '-fno-code -v0')
+
+function! ale_linters#haskell#ghc#GetCommand(buffer) abort
+ return 'ghc '
+ \ . ale#Var(a:buffer, 'haskell_ghc_options')
+ \ . ' %t'
+endfunction
+
call ale#linter#Define('haskell', {
\ 'name': 'ghc',
\ 'output_stream': 'stderr',
\ 'executable': 'ghc',
-\ 'command': 'ghc -fno-code -v0 %t',
+\ 'command_callback': 'ale_linters#haskell#ghc#GetCommand',
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
\})