mirror of
https://github.com/amix/vimrc
synced 2025-06-24 07:44:59 +08:00
Updated plugins
This commit is contained in:
@ -11,8 +11,10 @@ let g:loaded_syntastic_sh_shellcheck_checker = 1
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_sh_shellcheck_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-f gcc' })
|
||||
function! SyntaxCheckers_sh_shellcheck_GetLocList() dict " {{{1
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': s:GetShell(),
|
||||
\ 'args_after': '-f gcc' })
|
||||
|
||||
let errorformat =
|
||||
\ '%f:%l:%c: %trror: %m,' .
|
||||
@ -32,7 +34,27 @@ function! SyntaxCheckers_sh_shellcheck_GetLocList() dict
|
||||
endfor
|
||||
|
||||
return loclist
|
||||
endfunction
|
||||
endfunction " }}}1
|
||||
|
||||
" Utilities {{{1
|
||||
|
||||
function! s:GetShell() " {{{2
|
||||
let sh = ''
|
||||
|
||||
if syntastic#util#parseShebang()['exe'] ==# ''
|
||||
if syntastic#util#rawVar('is_kornshell', 0) || syntastic#util#rawVar('is_posix', 0)
|
||||
let sh = 'ksh'
|
||||
elseif syntastic#util#rawVar('is_bash', 0)
|
||||
let sh = 'bash'
|
||||
elseif syntastic#util#rawVar('is_sh', 0)
|
||||
let sh = 'sh'
|
||||
endif
|
||||
endif
|
||||
|
||||
return sh !=# '' ? '-s ' . sh : ''
|
||||
endfunction " }}}2
|
||||
|
||||
" }}}1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'sh',
|
||||
|
Reference in New Issue
Block a user