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

Updated plugins

This commit is contained in:
amix
2017-03-07 18:04:28 +01:00
parent fe46dfbbe6
commit ccb7854aa2
103 changed files with 1729 additions and 445 deletions

View File

@ -25,7 +25,7 @@ function! s:guru_cmd(args) range abort
endif
"return with a warning if the binary doesn't exist
let bin_path = go#path#CheckBinPath("guru")
let bin_path = go#path#CheckBinPath("guru")
if empty(bin_path)
return {'err': "bin path not found"}
endif
@ -41,7 +41,7 @@ function! s:guru_cmd(args) range abort
endif
" enable outputting in json format
if format == "json"
if format == "json"
call add(cmd, "-json")
endif
@ -120,8 +120,6 @@ function! s:sync_guru(args) abort
endif
endif
let old_gopath = $GOPATH
let $GOPATH = go#path#Detect()
" run, forrest run!!!
let command = join(result.cmd, " ")
@ -131,8 +129,6 @@ function! s:sync_guru(args) abort
let out = go#util#System(command)
endif
let $GOPATH = old_gopath
if has_key(a:args, 'custom_parse')
call a:args.custom_parse(go#util#ShellError(), out)
else
@ -217,11 +213,17 @@ endfunc
" run_guru runs the given guru argument
function! s:run_guru(args) abort
let old_gopath = $GOPATH
let $GOPATH = go#path#Detect()
if go#util#has_job()
return s:async_guru(a:args)
let res = s:async_guru(a:args)
else
let res = s:sync_guru(a:args)
endif
return s:sync_guru(a:args)
let $GOPATH = old_gopath
return res
endfunction
" Show 'implements' relation for selected package
@ -270,7 +272,7 @@ endfunction
function! go#guru#DescribeInfo() abort
" json_encode() and friends are introduced with this patch (7.4.1304)
" vim: https://groups.google.com/d/msg/vim_dev/vLupTNhQhZ8/cDGIk0JEDgAJ
" nvim: https://github.com/neovim/neovim/pull/4131
" nvim: https://github.com/neovim/neovim/pull/4131
if !exists("*json_decode")
call go#util#EchoError("requires 'json_decode'. Update your Vim/Neovim version.")
return
@ -465,7 +467,7 @@ function! go#guru#SameIds() abort
" json_encode() and friends are introduced with this patch (7.4.1304)
" vim: https://groups.google.com/d/msg/vim_dev/vLupTNhQhZ8/cDGIk0JEDgAJ
" nvim: https://github.com/neovim/neovim/pull/4131
" nvim: https://github.com/neovim/neovim/pull/4131
if !exists("*json_decode")
call go#util#EchoError("GoSameIds requires 'json_decode'. Update your Vim/Neovim version.")
return
@ -547,7 +549,7 @@ function! go#guru#ClearSameIds() abort
endfunction
function! go#guru#ToggleSameIds() abort
if len(getmatches()) != 0
if len(getmatches()) != 0
call go#guru#ClearSameIds()
else
call go#guru#SameIds()