Skip to content

Gopath detection and support for godep. Closes #425#429

Merged
fatih merged 10 commits intomasterfrom
gopath-change
May 22, 2015
Merged

Gopath detection and support for godep. Closes #425#429
fatih merged 10 commits intomasterfrom
gopath-change

Conversation

@fatih
Copy link
Copy Markdown
Owner

@fatih fatih commented May 16, 2015

This PR includes new features and improvements which brings better support for multiple GOPATHs and tools that support this (such as godep). This also creates a foundation for other new project based building tools, such as gb.

The changes are :

  • A new :GoPath command that displays the current set GOPATH. It changes the current GOPATH when an argument is passed, i.e: :GoPath /home/fatih/mypath
  • A new :GoPathClear command that clears the previous set GOPATH via
    :GoPath and restores it to the initialGOPATH value. the current set
    GOPATH.
  • A new go_autodetect_gopath setting. This is enabled by default. When enabled, vim-go automatically modifies the GOPATH if a project uses a certain package tool (such as godep). For now only godep is supported and any directory which has the /src but is absent in GOPATH. If a user edits a file and invokes any vim-go command, such as :GoDef, :GoBuild, etc.. the GOPATH will include the Godeps folder. For example any go-to-definition via :GoDef will jump to the source code inside Godeps.
  • Changes to vim-go code base to have better support for multiple OS.

This PR includes new features and improvements which brings better
support for multiple GOPATHs and tools that support this (such as
godep). This also creates a foundation for other new project based
building tools, such as gb.

The changes are :

* A new :GoPath command that displays the current set GOPATH. It changes
the current GOPATH when an argument is passed, i.e: :GoPath
/home/fatih/mypath
* A new :GoPathClear command that clears the previous set GOPATH via
:GoPath and restores it to the initial GOPATH value. the current set
GOPATH.
* A new go_autodetect_gopath setting. This is enabled
by default. When enabled, vim-go automatically modifies the GOPATH if a
project uses a certain package tool (such as godep). For now only godep
is supported.  If a user edits a file and invokes any vim-go command,
such as :GoDef, :GoBuild, etc.. the GOPATH will include the Godeps
folder. For example any go-to-definition via :GoDef will jump to the
source code inside Godeps.
* Changes to vim-go code base to have better support for multiple OS.
@fatih fatih mentioned this pull request May 20, 2015
@fatih
Copy link
Copy Markdown
Owner Author

fatih commented May 22, 2015

This is good to go. I'll merge it.

fatih added a commit that referenced this pull request May 22, 2015
Gopath detection and support for godep. Closes #425
@fatih fatih merged commit c78f751 into master May 22, 2015
@bketelsen
Copy link
Copy Markdown

you are awesome!

@fatih fatih mentioned this pull request May 23, 2015
4 tasks
@fatih fatih deleted the gopath-change branch May 26, 2015 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants