This page describes how a project should be setup using v1.0.0 release (or custom build from branch) in order to get all the functionality working properly.

For now, the plugin uses the following convention:

  • Go SDK -> GOROOT
  • Go Libraries -> GOPATH(s)

Create a new Project

Common

In 1.0.0 you need to take the following steps to create a new project and configure it properly:

Now, please follow the steps according to your IDE:

IntelliJ IDEA

  • create a new project by going to Create New Project | Go and follow the setup steps

Other IDEs

  • create a new blank project and you'll be prompted to setup a GO SDK for it

Once you've created the project according to your IDE, please follow the steps below

  • after your project has been created, you can then add your GOPATH packages to it so that you can use all the plugin features
  • to do, go to File | Settings | Languages & Frameworks | Go Libraries . Here you have a few options to choose from, but the recommended (and most tested one at the moment) is to create a new entry under Global Libraries that points to your GOPATH directory (see the example bellow).
  • if you've followed the steps correctly, then "everything" should work for you

One concrete example would be (under Linux, paths may vary on other OSes):

  • GOROOT (aka sdk home) /usr/local/go
  • GOPATH (the path in Go Libraries | Global Libraries) /home/florin/golang/
  • project home /home/florin/golang/src/github.com/dlsniper/misc

标签: go-lang-idea-plugin, go

仅有一条评论

  1. goland已经发布,建议直接使用goland。

添加新评论