This extension provides integration between Visual Studio Code and Bazel workspaces for Go projects. It allows you to define project scopes using .bazelproject files in Bazel monorepos, making it easier to navigate and work with Go code in large repositories.
Features
Project View Management: Uses .bazelproject files to define which Go directories should be included in your workspace
Scoped Project Views: Support for multiple .bazelproject files allowing you to switch between different project scopes
Bazel Go Target Integration: View, build, test, and run Bazel Go targets directly from VS Code
Automatic Sync: Automatically updates project view when .bazelproject files change
Bazel Query Integration: Uses Bazel query to find all Go targets in the workspace
Requirements
Bazel installed and available in your PATH
A Bazel workspace (containing a WORKSPACE or WORKSPACE.bazel file)
Go installed for Go language features
Getting Started
Open a Bazel workspace in VS Code
The extension will automatically create a default .vscode/.bazelproject file if one doesn't exist
Edit the .bazelproject file to include your Go directories: