summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2018-01-02 14:05:40 +0000
committerGitHub <noreply@github.com>2018-01-02 14:05:40 +0000
commit5285b0b332f067f56a6ac13a316db64acbac0c6b (patch)
tree40a372a0a15d8500f59e3d56ed764997abcbc1a7 /ale_linters
parente98a3899da6852026eab2356cd7a1cbc470aef09 (diff)
parent681c35169f7b8a71c311902d9e530a3e5906648f (diff)
downloadale-5285b0b332f067f56a6ac13a316db64acbac0c6b.zip
Merge pull request #1260 from kevinkjt2000/add-ghc-options
haskell_ghc_options are now added to the ghc command
Diffstat (limited to 'ale_linters')
-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',
\})