dot-files/vim/.vim/ftplugin/zsh.vim
Bruno BELANYI 4753e32c30 [ADD][VIM] Shellcheck options for ALE
I want shellcheck to detect which shell is most appropriate on the `sh`
filetype, but explicitly use the `bash` dialect on `bash` and `zsh`
filetypes.

I also really don't like nullary conditions in shell, so I'll screen for
those too.

I might turn on the 'quote-safe-variables' check too, because I think
quoting variables is a good habit to take.
2019-10-19 05:46:29 +02:00

9 lines
329 B
VimL

" Use shfmt as ALE fixer for zsh
let b:ale_fixers=[ 'shfmt' ]
" Indent with 4 spaces, simplify script, indent switch cases, use Bash variant
let b:ale_sh_shfmt_options='-i 4 -s -ci -ln bash'
" Use bash dialect explicitly, require explicit empty string test
let b:ale_sh_shellcheck_options='-s bash -o avoid-nullary-conditions'