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:
Amir Salihefendic
2018-11-01 11:03:42 +01:00
parent 44dca49794
commit d2d303593e
105 changed files with 2141 additions and 510 deletions

View File

@ -1,5 +1,20 @@
function! s:gocodeCommand(cmd, args) abort
let bin_path = go#path#CheckBinPath("gocode")
let l:gocode_bin = "gocode"
let l:gomod = go#util#gomod()
if filereadable(l:gomod)
" Save the file when in module mode so that go list can read the
" imports. If the user doesn't have autowrite or autorwriteall enabled,
" they'll need to write the file manually to get reliable results.
" See https://github.com/fatih/vim-go/pull/1988#issuecomment-428576989.
"
" TODO(bc): don't save the file when in module mode once
" golang.org/x/tools/go/packages has support for an overlay and it's used
" by gocode.
call go#cmd#autowrite()
let l:gocode_bin = "gocode-gomod"
endif
let bin_path = go#path#CheckBinPath(l:gocode_bin)
if empty(bin_path)
return []
endif
@ -18,6 +33,10 @@ function! s:gocodeCommand(cmd, args) abort
let cmd = extend(cmd, ['-source'])
endif
if go#config#GocodeUnimportedPackages()
let cmd = extend(cmd, ['-unimported-packages'])
endif
let cmd = extend(cmd, [a:cmd])
let cmd = extend(cmd, a:args)