2020-04-06 18:38:30 +02:00
|
|
|
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
|
|
|
call ftplugined#check_undo_ft()
|
|
|
|
|
|
|
|
" Use a small indentation value on Haskell files
|
|
|
|
setlocal shiftwidth=2
|
|
|
|
let b:undo_ftplugin.='|setlocal shiftwidth<'
|
2020-04-06 19:13:13 +02:00
|
|
|
|
|
|
|
" Use my desired ALE fixers for Haskell
|
|
|
|
let b:ale_fixers=[ 'brittany' ]
|
|
|
|
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
|
|
|
|
|
|
|
" Use stack-managed `hlint`
|
|
|
|
let b:ale_haskell_hlint_executable='stack'
|
|
|
|
let b:undo_ftplugin.='|unlet! b:ale_haskell_hlint_executable'
|
|
|
|
|
|
|
|
" Use stack-managed `brittany`
|
|
|
|
let b:ale_haskell_brittany_executable='stack'
|
|
|
|
let b:undo_ftplugin.='|unlet! b:ale_haskell_brittany_executable'
|
|
|
|
|
2020-04-06 19:17:09 +02:00
|
|
|
" Use dynamic libraries because of Arch linux, with default ALE options
|
|
|
|
let b:ale_haskell_ghc_options='--dynamic -fno-code -v0'
|
|
|
|
let b:undo_ftplugin.='|unlet! b:ale_haskell_ghc_options'
|
|
|
|
|
2020-04-06 19:13:13 +02:00
|
|
|
" Automatically format files when saving them
|
|
|
|
let b:ale_fix_on_save=1
|
|
|
|
let b:undo_ftplugin='|unlet! b:ale_lint_on_save'
|
2020-04-06 19:46:28 +02:00
|
|
|
|
|
|
|
" Change max length of a line to 100 for this buffer to match official guidelines
|
|
|
|
setlocal colorcolumn=100
|
|
|
|
let b:undo_ftplugin.='|setlocal colorcolumn<'
|