mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated vim plugins
This commit is contained in:
@ -32,7 +32,9 @@ function! s:gocodeCommand(cmd, preargs, args)
|
||||
" we might hit cache problems, as gocode doesn't handle well different
|
||||
" GOPATHS: https://github.com/nsf/gocode/issues/239
|
||||
let old_gopath = $GOPATH
|
||||
let old_goroot = $GOROOT
|
||||
let $GOPATH = go#path#Detect()
|
||||
let $GOROOT = go#util#env("goroot")
|
||||
|
||||
let socket_type = get(g:, 'go_gocode_socket_type', s:sock_type)
|
||||
let cmd = printf('%s -sock %s %s %s %s',
|
||||
@ -45,6 +47,8 @@ function! s:gocodeCommand(cmd, preargs, args)
|
||||
|
||||
let result = go#util#System(cmd)
|
||||
let $GOPATH = old_gopath
|
||||
let $GOROOT = old_goroot
|
||||
|
||||
if go#util#ShellError() != 0
|
||||
return "[\"0\", []]"
|
||||
else
|
||||
@ -74,6 +78,7 @@ function! s:gocodeEnableOptions()
|
||||
|
||||
call go#util#System(printf('%s set propose-builtins %s', go#util#Shellescape(bin_path), s:toBool(get(g:, 'go_gocode_propose_builtins', 1))))
|
||||
call go#util#System(printf('%s set autobuild %s', go#util#Shellescape(bin_path), s:toBool(get(g:, 'go_gocode_autobuild', 1))))
|
||||
call go#util#System(printf('%s set unimported-packages %s', go#util#Shellescape(bin_path), s:toBool(get(g:, 'go_gocode_unimported_packages', 1))))
|
||||
endfunction
|
||||
|
||||
function! s:toBool(val)
|
||||
|
Reference in New Issue
Block a user