An Improved Go Experience For The Atom Editor
- Github: https://github.com/joefitzgerald/go-plus
- Atom: https://atom.io/packages/go-plus
This package includes the following functionality:
- Display information about your current go installation, by running
go version
andgo env
- Autocomplete using
gocode
- Format your code with
gofmt
,goimports
, orgoreturns
; optionally run one of these tools on save of any.go
file - Run
go install .
andgo test -c -o {tempdir} .
to verify your code compiles and to keepgocode
suggestions up to date - Run a variety of linters (e.g.
golint
,vet
, etc.) against your code usinggometalinter
,revive
orgolangci-lint
- Run tests, display test output, and display test coverage using
go test -coverprofile
- Display documentation for identifiers in source code using
gogetdoc
- Rename the symbol under your cursor using
gorename
- Go to definition using
guru
orgodef
- Highlight occurrences of an identifier using
guru
- Find usages of an identifier using
guru
You can add debug functionality to Atom by installing the following package:
The following commands are run for the directory of the current file:
go install .
(for normal.go
files)go test -o {tmpdir} -c .
(for_test.go
files)
gocode
(and a few other tools, like gotype
) work on .a
files (i.e. the package object archive), and the way to keep these up to date is to run go install
periodically. This ensures your autocomplete suggestions are kept up to date.
The package has CI for OS X, Windows and Ubuntu.
If you are missing any required tools, you may be prompted to install them. You can also manually install the required tools in your terminal:
go get -u golang.org/x/tools/cmd/goimports
go get -u golang.org/x/tools/cmd/gorename
go get -u github.com/sqs/goreturns
go get -u github.com/mdempsky/gocode
go get -u github.com/alecthomas/gometalinter
go get -u github.com/mgechev/revive
go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
go get -u github.com/zmb3/gogetdoc
go get -u github.com/zmb3/goaddimport
go get -u github.com/rogpeppe/godef
go get -u golang.org/x/tools/cmd/guru
go get -u github.com/fatih/gomodifytags
go get -u github.com/tpng/gopkgs
go get -u github.com/ramya-rao-a/go-outline
Please consult the FAQ prior to opening an issue: https://github.com/joefitzgerald/go-plus/wiki/FAQ
If you have an issue with debugging, file an issue with go-debug
here.
- Joe Fitzgerald (@joefitzgerald)
- Zac Bergquist (@zmb3)
- Lukas Beranek (@lloiser)
A list of contributors can be found at https://github.com/joefitzgerald/go-plus/graphs/contributors. Thank you so much to everyone has contributed to the package ❤️. You are awesome!
Contributions are greatly appreciated. Please fork this repository, make your changes, and open a pull request. See Contributing for detailed instructions.