1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 09:35:01 +08:00

Updated plugins

This commit is contained in:
amix
2017-02-11 14:01:38 +01:00
parent a6de243fca
commit fe46dfbbe6
141 changed files with 2790 additions and 1630 deletions

View File

@ -10,10 +10,6 @@ if !exists("g:go_metalinter_enabled")
let g:go_metalinter_enabled = ['vet', 'golint', 'errcheck']
endif
if !exists("g:go_metalinter_deadline")
let g:go_metalinter_deadline = "5s"
endif
if !exists("g:go_golint_bin")
let g:go_golint_bin = "golint"
endif
@ -48,16 +44,33 @@ function! go#lint#Gometa(autosave, ...) abort
let cmd += [expand('%:p:h')]
else
" the user wants something else, let us use it.
let cmd += [split(g:go_metalinter_command, " ")]
let cmd += split(g:go_metalinter_command, " ")
endif
" gometalinter has a default deadline of 5 seconds.
"
" For async mode (s:lint_job), we want to override the default deadline only
" if we have a deadline configured.
"
" For sync mode (go#tool#ExecuteInDir), always explicitly pass the 5 seconds
" deadline if there is no other deadline configured. If a deadline is
" configured, then use it.
" Call gometalinter asynchronously.
if go#util#has_job() && has('lambda')
let deadline = get(g:, 'go_metalinter_deadline', 0)
if deadline != 0
let cmd += ["--deadline=" . deadline]
endif
call s:lint_job({'cmd': cmd})
return
endif
" we add deadline only for sync mode
let cmd += ["--deadline=" . g:go_metalinter_deadline]
" We're calling gometalinter synchronously.
let cmd += ["--deadline=" . get(g:, 'go_metalinter_deadline', "5s")]
if a:autosave
" include only messages for the active buffer
let cmd += ["--include='^" . expand('%:p') . ".*$'"]
@ -283,8 +296,8 @@ function s:lint_job(args)
endfunction
let start_options = {
\ 'callback': function("s:callback"),
\ 'close_cb': function("s:close_cb"),
\ 'callback': funcref("s:callback"),
\ 'close_cb': funcref("s:close_cb"),
\ }
call job_start(a:args.cmd, start_options)