Go for Visual Studio CodeThe VS Code Go extension provides rich language support for the Go programming language. Requirements
Quick StartWelcome! 👋🏻
You are ready to Go :-) 🎉🎉🎉 What's next
If you are new to Go, this article provides
the overview on Go code organization and basic Feature highlights
See the full feature breakdown for more details.
In addition to integrated editing features, the extension provides several
commands for working with Go files. You can access any of these by opening the
Command Palette (
⚠️ Note: the default syntax highlighting for Go files is provided by a TextMate rule embedded in VS Code, not by this extension. For better syntax highlighting, we recommend enabling
semantic highlighting
by turning on Gopls' Setting up your workspaceThe VS Code Go extension supports both Go modules are used to manage dependencies in
recent versions of Go. Modules replace the Unlike the traditional Your project may involve one or more modules. If you are working with multiple modules or uncommon project layouts, you will need to configure your workspace by using Workspace Folders. See the Supported workspace layouts documentation for more information. Pre-release versionIf you'd like to get early access to new features and bug fixes, you can use the
pre-release extension. Following the vscode's convention,
we use the minor version of the extension version number to distinguish stable
and pre-release versions ( To install the pre-release version, use the drop-down list to select "Install Pre-Release Version", or if already installed the Go extension, use the "Switch to Pre-Release Version" option in the Visual Studio Code extension management page. For more details about this mechanism, see the Visual Studio Code's documentation. TelemetryVS Code Go extension relies on the Go Telemetry to
learn insights about the performance and stability of the extension and the
language server (
After telemetry is enabled, the language server will upload metrics and stack traces to telemetry.go.dev. You can inspect what data is collected and can be uploaded by running:
If we get enough adoption, this data can significantly advance the pace of the Go extension development, and help us meet a higher standard of reliability. For example:
These are just a few ways that telemetry can improve gopls. The telemetry blog post series contains many more. Go telemetry is designed to be transparent and privacy-preserving. Learn more at https://go.dev/doc/telemetry. ContributingWe welcome your contributions and thank you for working to improve the Go development experience in VS Code. If you would like to help work on the VS Code Go extension, see our contribution guide to learn how to build and run the VS Code Go extension locally and contribute to the project. Code of ConductThis project follows the Go Community Code of Conduct. If you encounter a conduct-related issue, please mail conduct@golang.org. License |