mirror of
https://github.com/amix/vimrc
synced 2025-06-24 07:44:59 +08:00
Updated plugins
This commit is contained in:
@ -105,6 +105,20 @@ if exists("g:syntastic_quiet_warnings")
|
||||
endif
|
||||
endif
|
||||
|
||||
let s:debug_dump_options = [
|
||||
\ 'shell',
|
||||
\ 'shellcmdflag',
|
||||
\ 'shellpipe',
|
||||
\ 'shellquote',
|
||||
\ 'shellredir',
|
||||
\ 'shellslash',
|
||||
\ 'shelltemp',
|
||||
\ 'shellxquote'
|
||||
\ ]
|
||||
if v:version > 703 || (v:version == 703 && has('patch446'))
|
||||
call add(s:debug_dump_options, 'shellxescape')
|
||||
endif
|
||||
|
||||
|
||||
" debug constants
|
||||
let g:SyntasticDebugTrace = 1
|
||||
@ -283,24 +297,21 @@ function! s:CacheErrors(checkers)
|
||||
let active_checkers = 0
|
||||
let names = []
|
||||
|
||||
call syntastic#log#debugShowOptions(g:SyntasticDebugTrace, [
|
||||
\ 'shell', 'shellcmdflag', 'shellquote', 'shellxquote', 'shellredir',
|
||||
\ 'shellslash', 'shellpipe', 'shelltemp', 'shellxescape', 'shellxquote' ])
|
||||
call syntastic#log#debugShowOptions(g:SyntasticDebugTrace, s:debug_dump_options)
|
||||
call syntastic#log#debugDump(g:SyntasticDebugVariables)
|
||||
call syntastic#log#debugShowVariables(g:SyntasticDebugTrace, 'syntastic_aggregate_errors')
|
||||
call syntastic#log#debug(g:SyntasticDebugTrace, 'getcwd() = ' . getcwd())
|
||||
|
||||
let filetypes = s:ResolveFiletypes()
|
||||
let aggregate_errors =
|
||||
\ exists('b:syntastic_aggregate_errors') ? b:syntastic_aggregate_errors : g:syntastic_aggregate_errors
|
||||
let decorate_errors = (aggregate_errors || len(filetypes) > 1) &&
|
||||
\ (exists('b:syntastic_id_checkers') ? b:syntastic_id_checkers : g:syntastic_id_checkers)
|
||||
let aggregate_errors = syntastic#util#var('aggregate_errors')
|
||||
let decorate_errors = (aggregate_errors || len(filetypes) > 1) && syntastic#util#var('id_checkers')
|
||||
|
||||
for ft in filetypes
|
||||
let clist = empty(a:checkers) ? s:registry.getActiveCheckers(ft) : s:registry.getCheckers(ft, a:checkers)
|
||||
|
||||
for checker in clist
|
||||
let active_checkers += 1
|
||||
call syntastic#log#debug(g:SyntasticDebugTrace, "CacheErrors: Invoking checker: " . checker.getName())
|
||||
call syntastic#log#debug(g:SyntasticDebugTrace, 'CacheErrors: Invoking checker: ' . checker.getName())
|
||||
|
||||
let loclist = checker.getLocList()
|
||||
|
||||
@ -342,11 +353,11 @@ function! s:CacheErrors(checkers)
|
||||
endif
|
||||
endif
|
||||
|
||||
call syntastic#log#debug(g:SyntasticDebugLoclist, "aggregated:", newLoclist)
|
||||
call syntastic#log#debug(g:SyntasticDebugLoclist, 'aggregated:', newLoclist)
|
||||
|
||||
if type(g:syntastic_quiet_messages) == type({}) && !empty(g:syntastic_quiet_messages)
|
||||
call newLoclist.quietMessages(g:syntastic_quiet_messages)
|
||||
call syntastic#log#debug(g:SyntasticDebugLoclist, "filtered by g:syntastic_quiet_messages:", newLoclist)
|
||||
call syntastic#log#debug(g:SyntasticDebugLoclist, 'filtered by g:syntastic_quiet_messages:', newLoclist)
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -456,11 +467,11 @@ function! SyntasticMake(options)
|
||||
let $LC_ALL = old_lc_all
|
||||
let $LC_MESSAGES = old_lc_messages
|
||||
|
||||
call syntastic#log#debug(g:SyntasticDebugLoclist, "checker output:", err_lines)
|
||||
call syntastic#log#debug(g:SyntasticDebugLoclist, 'checker output:', err_lines)
|
||||
|
||||
if has_key(a:options, 'preprocess')
|
||||
let err_lines = call(a:options['preprocess'], [err_lines])
|
||||
call syntastic#log#debug(g:SyntasticDebugLoclist, "preprocess:", err_lines)
|
||||
call syntastic#log#debug(g:SyntasticDebugLoclist, 'preprocess:', err_lines)
|
||||
endif
|
||||
lgetexpr err_lines
|
||||
|
||||
@ -480,7 +491,7 @@ function! SyntasticMake(options)
|
||||
call syntastic#util#redraw(g:syntastic_full_redraws)
|
||||
endif
|
||||
|
||||
call syntastic#log#debug(g:SyntasticDebugLoclist, "raw loclist:", errors)
|
||||
call syntastic#log#debug(g:SyntasticDebugLoclist, 'raw loclist:', errors)
|
||||
|
||||
if has_key(a:options, 'returns') && index(a:options['returns'], v:shell_error) == -1
|
||||
throw 'Syntastic: checker error'
|
||||
@ -499,7 +510,7 @@ function! SyntasticMake(options)
|
||||
for rule in a:options['postprocess']
|
||||
let errors = call('syntastic#postprocess#' . rule, [errors])
|
||||
endfor
|
||||
call syntastic#log#debug(g:SyntasticDebugLoclist, "postprocess:", errors)
|
||||
call syntastic#log#debug(g:SyntasticDebugLoclist, 'postprocess:', errors)
|
||||
endif
|
||||
|
||||
return errors
|
||||
|
@ -21,9 +21,7 @@ function! g:SyntasticBalloonsNotifier.New()
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticBalloonsNotifier.enabled()
|
||||
return
|
||||
\ has('balloon_eval') &&
|
||||
\ (exists('b:syntastic_enable_balloons') ? b:syntastic_enable_balloons : g:syntastic_enable_balloons)
|
||||
return has('balloon_eval') && syntastic#util#var('enable_balloons')
|
||||
endfunction
|
||||
|
||||
" Update the error balloons
|
||||
|
@ -76,14 +76,14 @@ function! g:SyntasticChecker.getLocList()
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticChecker.makeprgBuild(opts)
|
||||
let setting = 'g:syntastic_' . self._filetype . '_' . self._name . '_'
|
||||
let basename = self._filetype . '_' . self._name . '_'
|
||||
|
||||
let parts = []
|
||||
call extend(parts, self._getOpt(a:opts, setting, 'exe', self.getExecEscaped()))
|
||||
call extend(parts, self._getOpt(a:opts, setting, 'args', ''))
|
||||
call extend(parts, self._getOpt(a:opts, setting, 'fname', syntastic#util#shexpand('%')))
|
||||
call extend(parts, self._getOpt(a:opts, setting, 'post_args', ''))
|
||||
call extend(parts, self._getOpt(a:opts, setting, 'tail', ''))
|
||||
call extend(parts, self._getOpt(a:opts, basename, 'exe', self.getExecEscaped()))
|
||||
call extend(parts, self._getOpt(a:opts, basename, 'args', ''))
|
||||
call extend(parts, self._getOpt(a:opts, basename, 'fname', syntastic#util#shexpand('%')))
|
||||
call extend(parts, self._getOpt(a:opts, basename, 'post_args', ''))
|
||||
call extend(parts, self._getOpt(a:opts, basename, 'tail', ''))
|
||||
|
||||
return join(parts)
|
||||
endfunction
|
||||
@ -115,11 +115,11 @@ function! g:SyntasticChecker._populateHighlightRegexes(errors)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticChecker._getOpt(opts, setting, name, default)
|
||||
let sname = a:setting . a:name
|
||||
function! g:SyntasticChecker._getOpt(opts, basename, name, default)
|
||||
let user_val = syntastic#util#var(a:basename . a:name)
|
||||
let ret = []
|
||||
call extend( ret, self._shescape(get(a:opts, a:name . '_before', '')) )
|
||||
call extend( ret, self._shescape(exists(sname) ? {sname} : get(a:opts, a:name, a:default)) )
|
||||
call extend( ret, self._shescape(user_val != '' ? user_val : get(a:opts, a:name, a:default)) )
|
||||
call extend( ret, self._shescape(get(a:opts, a:name . '_after', '')) )
|
||||
|
||||
return ret
|
||||
|
@ -17,7 +17,7 @@ function! g:SyntasticCursorNotifier.New()
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticCursorNotifier.enabled()
|
||||
return exists('b:syntastic_echo_current_error') ? b:syntastic_echo_current_error : g:syntastic_echo_current_error
|
||||
return syntastic#util#var('echo_current_error')
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticCursorNotifier.refresh(loclist)
|
||||
|
@ -28,9 +28,7 @@ function! g:SyntasticHighlightingNotifier.New()
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticHighlightingNotifier.enabled()
|
||||
return
|
||||
\ s:has_highlighting &&
|
||||
\ (exists('b:syntastic_enable_highlighting') ? b:syntastic_enable_highlighting : g:syntastic_enable_highlighting)
|
||||
return s:has_highlighting && syntastic#util#var('enable_highlighting')
|
||||
endfunction
|
||||
|
||||
" Sets error highlights in the cuirrent window
|
||||
|
@ -48,9 +48,7 @@ function! g:SyntasticSignsNotifier.New()
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticSignsNotifier.enabled()
|
||||
return
|
||||
\ has('signs') &&
|
||||
\ exists('b:syntastic_enable_signs') ? b:syntastic_enable_signs : g:syntastic_enable_signs
|
||||
return has('signs') && syntastic#util#var('enable_signs')
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticSignsNotifier.refresh(loclist)
|
||||
|
Reference in New Issue
Block a user