mirror of
https://github.com/dense-analysis/ale
synced 2024-12-23 22:53:40 +00:00
768f761017
* Vim scripts shouldn't have hyphens Especially not ones that will be autoloaded. You can't have a hyphen in a function name, so autoloading functions based on filename will fail. * Add g:haskell_stack_build_options, default: --fast If we're going to use the --fast option, we may as well go the whole 9 yards and let the user configure the 'stack build' flags. * Create documentation for stack-build options
23 lines
754 B
VimL
23 lines
754 B
VimL
" Author: Jake Zimmerman <jake@zimmerman.io>
|
|
" Description: Like stack-ghc, but for entire projects
|
|
"
|
|
" Note: Ideally, this would *only* typecheck. Right now, it also does codegen.
|
|
" See <https://github.com/commercialhaskell/stack/issues/977>.
|
|
|
|
call ale#Set('haskell_stack_build_options', '--fast')
|
|
|
|
function ale_linters#haskell#stack_build#GetCommand(buffer) abort
|
|
let l:flags = ale#Var(a:buffer, 'haskell_stack_build_options')
|
|
|
|
return 'stack build ' . l:flags
|
|
endfunction
|
|
|
|
call ale#linter#Define('haskell', {
|
|
\ 'name': 'stack-build',
|
|
\ 'output_stream': 'stderr',
|
|
\ 'executable': 'stack',
|
|
\ 'command_callback': 'ale_linters#haskell#stack_build#GetCommand',
|
|
\ 'lint_file': 1,
|
|
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
|
|
\})
|