Skip to content

Work with "gvm linkthis" #23

Open
Open
@zhouhua015

Description

@zhouhua015

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions