This is a temporary guide, while we are working to write a more comprehensive guide for Go projects in Cursor.

Setting up Go in Cursor

Set up your Go development environment in Cursor with these recommendations:

Extensions

Install these essential extensions:
  • Go (from Go Team at Google)
  • Go Test Explorer
  • Go Doc

Development Environment

  • Install Go from golang.org
  • Set up GOPATH and GOROOT
  • Install Go tools:
    go install golang.org/x/tools/gopls@latest
    go install golang.org/x/tools/cmd/goimports@latest
    
Enable these Cursor features:
  • Go to definition
  • Find references
  • Code formatting (gofmt)
  • Auto-imports
  • Code completion

Project Tools

Cursor supports:
  • Go modules
  • Testing framework
  • Debugging
  • Package management
  • Code generation tools