diff --git a/ale_linters/haskell/hdevtools.vim b/ale_linters/haskell/hdevtools.vim index 93c7ddd6..dc902152 100644 --- a/ale_linters/haskell/hdevtools.vim +++ b/ale_linters/haskell/hdevtools.vim @@ -2,7 +2,7 @@ " Description: hdevtools for Haskell files call ale#Set('haskell_hdevtools_executable', 'hdevtools') -call ale#Set('haskell_hdevtools_options', '-g -Wall') +call ale#Set('haskell_hdevtools_options', get(g:, 'hdevtools_options', '-g -Wall')) function! ale_linters#haskell#hdevtools#GetExecutable(buffer) abort return ale#Var(a:buffer, 'haskell_hdevtools_executable') diff --git a/doc/ale-haskell.txt b/doc/ale-haskell.txt index 9fab39bf..09ecd92d 100644 --- a/doc/ale-haskell.txt +++ b/doc/ale-haskell.txt @@ -36,10 +36,16 @@ g:ale_haskell_hdevtools_executable *g:ale_haskell_hdevtools_executable* g:ale_haskell_hdevtools_options *g:ale_haskell_hdevtools_options* *b:ale_haskell_hdevtools_options* Type: |String| - Default: `'-g -Wall'` + Default: `get(g:, 'hdevtools_options', '-g -Wall')` This variable can be changed to modify flags given to hdevtools. + The hdevtools documentation recommends setting GHC options for `hdevtools` + with `g:hdevtools_options`. ALE will use the value of `g:hdevtools_options` + for the value of `g:ale_haskell_hdevtools_options` by default, so this + option can be respected and overridden specifically for ALE. + + =============================================================================== hfmt *ale-haskell-hfmt*