Skip to content

Getting Started

Download Go

To check the installed version, run the following command:

Terminal window
go version

To install the latest stable release of gopls, run the following command:

Terminal window
go install golang.org/x/tools/gopls@latest

Some editors, such as VS Code, will handle this step for you, and ensure that gopls is updated when a new stable version is released.

To check the installed version, run the following command:

Terminal window
gopls version

Install the Go extension for VS Code.

Use the following recommended settings in Preferences: Open User Settings (JSON) to enable semantic highlighting, automatically update tools, and set the default formatter for Go.

settings.json
{
"editor.semanticHighlighting.enabled": true,
"gopls": {
"ui.semanticTokens": true
},
"go.toolsManagement.autoUpdate": true,
"[go]": {
"editor.defaultFormatter": "golang.go"
}
}