File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -578,19 +578,16 @@ function s:EnableShfmt()
578578 endif
579579 let l: git_cmd = ' git -C ' . l: git_dir . ' rev-parse --show-toplevel 2>/dev/null'
580580 let l: git_root = substitute (system (l: git_cmd ), ' \n\+$' , ' ' , ' ' )
581+ augroup shells
582+ autocmd !
583+ autocmd FileType sh setlocal expandtab
584+ augroup END
581585 if v: shell_error == 0 && filereadable (l: git_root . ' /.shfmt_disable' )
582- augroup shells
583- autocmd !
584- autocmd FileType sh setlocal expandtab
585- augroup END
586586 if has_key (g: ale_fixers , ' sh' )
587587 unlet g: ale_fixers .sh
588588 endif
589589 else
590- augroup shells
591- autocmd !
592- autocmd FileType sh setlocal noexpandtab
593- augroup END
590+ let g: ale_sh_shfmt_options = " -i 2"
594591 let g: ale_fixers .sh = [' shfmt' ]
595592 endif
596593endfunction
You can’t perform that action at this time.
0 commit comments