vim-gocode
vim-gocode copied to clipboard
Work with "gvm linkthis"
What's wrong with my make
I have only 1 package main
, which is divided into several files. Those files are put in a directory that's not under GOPATH, gvm linkthis
is used to link my package directory to GOPATH.
However, every time of :make
running, I got non-sense errors, reporting, either a function name is not recognized, or some variables are not defined. Both of them are defined in another go file within same package.
What I've figured
Vim automatically resolves symlinks, and vim-gocode uses fnamemodify(resolve(a:arg), ':p:h')
to get full path of a file. Even when my bash pwd
gives me $GOPATH/src/MY_PACKAGE
, the full path of current go file is still resolved to actual path, ~/MY_PACKAGE
, then go#package#FromPath()
won't find any workspace, the b:gopackage
would not be set.
Could it be possible?
That b:gopackage
become g:gopackage
, so users can overrule the setting?