llms.txt: machine-readable documentation index. Markdown version of this page is also available.

Go by GoLand Help

Settings

Open extension settings

  1. Open the Command Palette (Ctrl+Shift+P) and run Preferences: Open Settings (UI).

  2. In the settings search field, enter @ext:JetBrains.goland-server.

Go settings

The extension reads go.toolsEnvVars, go.buildTags, and go.buildFlags from user or workspace settings. It uses one build target for code analysis across the whole workspace. Changes take effect after a language server restart.

Go tools environment variables

Setting ID: go.toolsEnvVars

A map of environment variable names to string values. For code analysis, the extension reads GOOS for the target operating system, GOARCH for the target architecture, and CGO_ENABLED (1 enables cgo, 0 disables it). It also reads -tags from GOFLAGS. These values override the corresponding variables in the extension host environment.

For example, {"GOOS": "linux", "GOARCH": "arm64"} selects files for Linux on ARM64.

Go build tags

Setting ID: go.buildTags

Build tags to use for code analysis, as a string such as "integration,enterprise". These tags override the tags in GOFLAGS.

Go build flags

Setting ID: go.buildFlags

A list of build flags. Code analysis uses only the -tags flag. To specify tags in this setting, use separate entries for the flag and its value, such as ["-tags", "integration"]. This form overrides go.buildTags and the tags in GOFLAGS.

Go SDK root

Setting ID: go.goroot

The absolute path to the root of an installed Go SDK on the machine where the language server runs. An empty value enables automatic Go SDK detection.

The setting applies to the whole workspace. The path supports the following substitutions:

  • ~ at the start of the path: your home directory.

  • ${env:NAME}: the value of the environment variable NAME, or an empty string if the variable is unset.

  • ${workspaceFolder} and ${workspaceRoot}: the path to the workspace folder.

  • ${workspaceFolderBasename}: the name of the workspace folder.

Workspace variables use the folder of the active file. If the file has no workspace folder, or no file is active, they use the first workspace folder.

For remote workspaces, paths and variables refer to the machine where the language server runs.

If the expanded path is relative or does not point to an existing directory, Go by GoLand shows a warning and detects Go automatically. If it expands to an empty string, the extension detects Go automatically.

Changes take effect after a language server restart. For configuration instructions, refer to Select a Go SDK.

Language server settings

Additional JVM arguments

Setting ID: intellij.additionalJvmArgs

Additional JVM arguments passed to the language server. For example, -Xmx4g increases the maximum heap size to 4 GB. Changes take effect after a language server restart.

For configuration instructions, refer to Configure JVM memory.

Build tool

Setting ID: intellij.buildTool

Controls automatic Go project detection in workspace folders:

  • gomodules-recursive-scan (default): detects Go modules anywhere in the workspace.

  • gomodules: detects a Go project only if the workspace root contains a go.mod or go.work file.

  • null: checks the workspace root first and scans its subdirectories if the root has no go.mod or go.work file.

  • "" (an empty string): disables automatic project detection.

After detection succeeds, both Go project types scan the directory and its subdirectories during import. A non-empty intellij.projects list takes precedence over this setting for all workspace folders.

For configuration instructions, refer to Select how to detect Go projects.

Completion case sensitivity

Setting ID: intellij.completion.caseSensitivity

Controls how code completion matches uppercase and lowercase letters in the text you type:

  • Case-insensitive (none): ignores letter case.

  • First letter only (firstLetter, default): matches the case of the first letter.

  • All letters (all): matches the case of every letter.

Changes take effect after a language server restart. For configuration instructions, refer to Configure completion case sensitivity.

Language server port

Setting ID: intellij.dev.serverPort

The port of a locally running language server. The value -1 uses the bundled language server instead.

For configuration instructions, refer to Connect to a local language server.

Workspace index reuse

Setting ID: intellij.forkFromWorkspace

The absolute path to a workspace that Go by GoLand has already indexed. The path points to the source checkout, such as the main checkout of a Git worktree, on the machine where the language server runs. Both null (default) and an empty string ("") disable index reuse.

Set this value before opening the new worktree for the first time. When the new workspace has no index, Go by GoLand copies the source index and updates it for the new workspace. Each workspace then keeps its own index. If the source index uses a different format, the language server indexes the new workspace from scratch.

For configuration instructions and an example, refer to Reuse an index for a new worktree.

Projects to import

Setting ID: intellij.projects

A non-empty list replaces automatic project detection across all workspace folders. Include every directory you want the extension to use as an import root. An empty list uses the detection mode set by intellij.buildTool.

Each entry sets a project type (gomodules-recursive-scan or gomodules) and a file:/// URI for the directory. You can use the $PROJECT_DIR$ macro in the URI and set offline to true to import using already downloaded modules.

For configuration instructions, refer to Find the project import setting and Specify directories to import.

Protocol tracing

Setting ID: intellij.trace.server

The level of tracing between the editor and the language server: off, messages, or verbose. The verbose level logs all protocol messages.

For configuration instructions, refer to Configure protocol tracing.

Workspace reload on save

Setting ID: intellij.workspace.reloadOnBuildFileSave

Controls what happens when you save a workspace folder's or subproject's .vscode/settings.json file in the editor.

  • Always (always, default) reloads automatically.

  • Prompt (prompt) asks before reloading.

  • Never (never) skips reloads triggered by these saves.

The language server watches go.mod and go.work separately. Their changes can trigger a reimport even when this setting is never.

For configuration instructions, refer to Configure workspace reloads.

The following settings control data sharing and your region.

Data sharing

Setting ID: intellij.dataSharing

Controls which diagnostic data the language server shares with JetBrains:

  • Full (full) : sends anonymous usage statistics and full error reports, including exception messages and attachments.

  • Anonymous (anonymous) : sends anonymous usage statistics and anonymized error reports. Exception messages, user data, and attachments are removed.

  • None (none) : does not send usage statistics or error reports.

The default is not_set. The extension asks you to choose a preference during setup. At server startup, not_set behaves like none. This setting is available in user settings. Changes take effect after a language server restart.

For configuration instructions, refer to Change region and data sharing settings.

Region

Setting ID: intellij.region

Your region for JetBrains product terms and data processing.

The available regions are:

  • Africa (africa)

  • Americas (americas)

  • Asia (Except Mainland China) (apac)

  • Mainland China (china)

  • Europe (europe)

  • Middle East (middle_east)

  • Oceania (oceania)

The default is not_set. The extension asks you to select a region during setup. This setting is available in user settings. Changes take effect after a language server restart.

Disable index write-ahead logging

Setting ID: intellij.disableRocksDBWriteAheadLog

Disables the write-ahead log of the index database to reduce peak disk usage during indexing. The option does not reduce the final size of the index. If the language server terminates unexpectedly, recent index changes can be lost.

Changes take effect after a language server restart. For configuration instructions, refer to Disable the index write-ahead log.

17 November 2026