mirror of
				https://github.com/amix/vimrc
				synced 2025-10-31 14:43:35 +08:00 
			
		
		
		
	Updated plugins
This commit is contained in:
		| @ -4,15 +4,13 @@ if exists("g:go_loaded_install") | ||||
| endif | ||||
| let g:go_loaded_install = 1 | ||||
|  | ||||
|  | ||||
| " these packages are used by vim-go and can be automatically installed if | ||||
| " needed by the user with GoInstallBinaries | ||||
| let s:packages = [ | ||||
|             \ "github.com/nsf/gocode", | ||||
|             \ "github.com/alecthomas/gometalinter",  | ||||
|             \ "golang.org/x/tools/cmd/goimports", | ||||
|             \ "github.com/rogpeppe/godef", | ||||
|             \ "golang.org/x/tools/cmd/oracle", | ||||
|             \ "golang.org/x/tools/cmd/guru", | ||||
|             \ "golang.org/x/tools/cmd/gorename", | ||||
|             \ "github.com/golang/lint/golint", | ||||
|             \ "github.com/kisielk/errcheck", | ||||
| @ -20,6 +18,7 @@ let s:packages = [ | ||||
|             \ "github.com/klauspost/asmfmt/cmd/asmfmt", | ||||
|             \ "github.com/fatih/motion", | ||||
|             \ "github.com/zmb3/gogetdoc", | ||||
|             \ "github.com/josharian/impl", | ||||
|             \ ] | ||||
|  | ||||
| " These commands are available on any filetypes | ||||
| @ -54,7 +53,7 @@ function! s:GoInstallBinaries(updateBinaries) | ||||
|     let old_path = $PATH | ||||
|  | ||||
|     " vim's executable path is looking in PATH so add our go_bin path to it | ||||
|     let $PATH = $PATH . go#util#PathListSep() .go_bin_path | ||||
|     let $PATH = go_bin_path . go#util#PathListSep() . $PATH | ||||
|  | ||||
|     " when shellslash is set on MS-* systems, shellescape puts single quotes | ||||
|     " around the output string. cmd on Windows does not handle single quotes | ||||
| @ -68,7 +67,7 @@ function! s:GoInstallBinaries(updateBinaries) | ||||
|  | ||||
|     let cmd = "go get -u -v " | ||||
|  | ||||
|     let s:go_version = matchstr(system("go version"), '\d.\d.\d') | ||||
|     let s:go_version = matchstr(go#util#System("go version"), '\d.\d.\d') | ||||
|  | ||||
|     " https://github.com/golang/go/issues/10791 | ||||
|     if s:go_version > "1.4.0" && s:go_version < "1.5.0" | ||||
| @ -92,8 +91,8 @@ function! s:GoInstallBinaries(updateBinaries) | ||||
|             endif | ||||
|  | ||||
|  | ||||
|             let out = system(cmd . shellescape(pkg)) | ||||
|             if v:shell_error | ||||
|             let out = go#util#System(cmd . shellescape(pkg)) | ||||
|             if go#util#ShellError() != 0 | ||||
|                 echo "Error installing ". pkg . ": " . out | ||||
|             endif | ||||
|         endif | ||||
| @ -168,10 +167,6 @@ augroup vim-go | ||||
|     if get(g:, "go_metalinter_autosave", 0) | ||||
|         autocmd BufWritePost *.go call go#lint#Gometa(1) | ||||
|     endif | ||||
|  | ||||
|     " initialize window-local godef stack | ||||
| 	au BufReadPre,WinEnter *.go if !exists('w:go_stack') | let w:go_stack = [] | endif | ||||
| 	au BufReadPre,WinEnter *.go if !exists('w:go_stack_level') | let w:go_stack_level = 0 | endif | ||||
| augroup END | ||||
|  | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 amix
					amix