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-05-02 14:42:08 +02:00
parent c4fbfe8aa8
commit 85e105159e
63 changed files with 1389 additions and 737 deletions

View File

@ -10,6 +10,10 @@ if !exists("g:go_metalinter_enabled")
let g:go_metalinter_enabled = ['vet', 'golint', 'errcheck']
endif
if !exists("g:go_metalinter_excludes")
let g:go_metalinter_excludes = []
endif
if !exists("g:go_golint_bin")
let g:go_golint_bin = "golint"
endif
@ -40,6 +44,10 @@ function! go#lint#Gometa(autosave, ...) abort
let cmd += ["--enable=".linter]
endfor
for exclude in g:go_metalinter_excludes
let cmd += ["--exclude=".exclude]
endfor
" path
let cmd += [expand('%:p:h')]
else
@ -252,23 +260,14 @@ function s:lint_job(args)
copen
endfunction
function! s:close_cb(chan) closure
let l:job = ch_getjob(a:chan)
let l:status = job_status(l:job)
let exitval = 1
if l:status == "dead"
let l:info = job_info(l:job)
let exitval = l:info.exitval
endif
function! s:exit_cb(job, exitval) closure
let status = {
\ 'desc': 'last status',
\ 'type': "gometaliner",
\ 'state': "finished",
\ }
if exitval
if a:exitval
let status.state = "failed"
endif
@ -297,7 +296,7 @@ function s:lint_job(args)
let start_options = {
\ 'callback': funcref("s:callback"),
\ 'close_cb': funcref("s:close_cb"),
\ 'exit_cb': funcref("s:exit_cb"),
\ }
call job_start(a:args.cmd, start_options)