Fix #1479 - Respect g:hdevtools_options for hdevtools

This commit is contained in:
w0rp 2018-04-07 22:50:26 +01:00
parent c5d3af04fc
commit bb775e4e22
No known key found for this signature in database
GPG Key ID: 0FC1ECAA8C81CD83
2 changed files with 8 additions and 2 deletions

View File

@ -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')

View File

@ -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*