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-03-31 11:56:26 -03:00
parent 7c643a2d9c
commit 02572caa95
84 changed files with 4588 additions and 1749 deletions

View File

@ -54,8 +54,14 @@ function! go#package#Paths() abort
return dirs
endfunction
let s:import_paths = {}
" ImportPath returns the import path in the current directory it was executed
function! go#package#ImportPath() abort
let dir = expand("%:p:h")
if has_key(s:import_paths, dir)
return s:import_paths[dir]
endif
let out = go#tool#ExecuteInDir("go list")
if go#util#ShellError() != 0
return -1
@ -69,6 +75,8 @@ function! go#package#ImportPath() abort
return -1
endif
let s:import_paths[dir] = import_path
return import_path
endfunction