Atom Golang Setup

I’ve recently switched to Atom from Sublime Text for web development. The transition was relatively painless since many of the keyboard shortcuts and capabilities are the same in. I really enjoy usig Atom and want to have that same experience with programming in Go. This documents my Go setup in Atom.

Install and Configuration Steps

  1. Install go-plus

  2. Set the go-plus GOPATH setting

    Ideally the Atom application process should have GOPATH in its ENV and you shouldn’t have to set this.

  3. Install atom build

  4. Set build Panel Visibility setting to Keep Visible

  5. Add .atom-build.json to root of your project directory

  "cmd": "$GOROOT/bin/go run {FILE_ACTIVE}",
  "shell": true,
  "env": {
    "GOROOT": "/usr/local/go",
    "GOPATH": "/Users/pfeilbr/go"

Keyboard Shortcuts

  • cmd-alt-b - run current file
  • cmd-alt-g - goto definition
  • ctrl-space - code completion