VS Code extension
Biome’s official VS Code extension adds formatting, linting, and code fixes to VS Code and editors based on it. This page covers the workspaces it supports and every setting it accepts.
To install the extension and set up formatting and fixes on save, see Set up your editor.
Workspaces
Section titled “Workspaces”The extension supports single-root and multi-root workspaces.
A single-root workspace is the typical VS Code workspace, with only one workspace folder:
Directorysrc/
- main.ts
- biome.json
- package.json
A multi-root workspace has multiple workspace folders. The extension creates a Biome instance per workspace folder:
Directoryapi/ (workspace folder)
- biome.json
Directorysrc/
- main.ts
Directoryapp/ (workspace folder)
- biome.json
Directorysrc/
- main.ts
- my.code-workspace
Settings
Section titled “Settings”Set the following settings in your VS Code settings.
biome.enabled
Section titled “biome.enabled”Type: boolean
Default: true
Scopes: global, workspace, workspace folder
Enables the extension’s LSP session for a workspace folder. When set globally, it applies to all workspace folders, unless they override the setting.
biome.configurationPath
Section titled “biome.configurationPath”Type: string
Default: null
Scopes: global, workspace, workspace folder
Path to a custom configuration file. If unset, Biome uses the default configuration file.
biome.requireConfiguration
Section titled “biome.requireConfiguration”Type: boolean
Default: false
Scopes: global, workspace, workspace folder
Requires a configuration file before the extension registers Biome as a formatter and diagnostics provider. When set to true, the extension registers itself only if a biome.json file is present in the workspace folder.
This setting replaces biome.requireConfigFile from the 2.x extension, which is no longer supported.
biome.inlineConfig
Section titled “biome.inlineConfig”Type: object
Default: null
An inline Biome configuration. Its options override the options from any biome.json file read from disk, or the defaults.
For example, to turn off the noConsole rule while you develop locally, even though your biome.json enables it:
{ "biome.inlineConfig": { "linter": { "rules": { "suspicious": { "noConsole": "off" } } } }}biome.gotoDefinition
Section titled “biome.gotoDefinition”Type: boolean
Default: false
Enables the go-to definition feature in the editor.
{ "biome.gotoDefinition": true}biome.lsp.bin
Section titled “biome.lsp.bin”Type: string | object
Default: null
Scopes: global, workspace, workspace folder
Path to the biome binary, which overrides the one the extension finds. Use it to run a different version of Biome, or a binary that is not on your PATH. The value is either a path to a binary, or an object that maps a platform to a path.
This setting replaces biome.lspBin from the 2.x extension. The old name still works, but it is deprecated.
{ "biome.lsp.bin": "/path/to/biome"}When using an object, the key is the platform identifier, constructed from the <process.os>-<process.arch> value, and the value is the path to the binary.
{ "biome.lsp.bin": { "darwin-arm64": "/path/to/biome", "win32-x64": "/path/to/biome.exe" }}The @biomejs/biome package does not ship a binary. The file @biomejs/biome/bin is a small wrapper that delegates to the real binary, and the binary installed on your machine depends on your operating system and architecture.
The binaries are in the packages that start with @biomejs/cli-*, listed on npm. To point to a binary installed with npm, use its path inside node_modules:
{ "biome.lsp.bin": "./node_modules/@biomejs/cli-linux-x64/biome"}When using an object, the key is the platform identifier, constructed from the <process.os>-<process.arch> value, and the value is the path to the binary.
{ "biome.lsp.bin": { "darwin-arm64": "./node_modules/@biomejs/cli-darwin-arm64/biome", "win32-x64": "./node_modules/@biomejs/cli-win32-x64/biome.exe" }}biome.runFromTemporaryLocation
Section titled “biome.runFromTemporaryLocation”Type: boolean
Default: true on Windows, false on other platforms
Scopes: global, workspace, workspace folder
Copies the Biome binary to a temporary location and runs it from there.
On Windows, disabling this setting prevents you from updating Biome in your node_modules while an LSP session is running, because the operating system locks the running binary. Close VS Code before you update Biome.
biome.suggestInstallingGlobally
Section titled “biome.suggestInstallingGlobally”Type: boolean
Default: true
Scopes: global, workspace, workspace folder
Shows a popup that suggests installing Biome globally when a global installation is required but not found in the PATH.
biome.lsp.trace.server
Section titled “biome.lsp.trace.server”Type: "off" | "messages" | "verbose"
Default: off
Scopes: global
Sets the logging level of the Biome LSP trace. Set it to verbose when you encounter issues with the extension and want to share the logs with the Biome team. See Record the LSP trace in VS Code.
biome.lsp.watcher.kind
Section titled “biome.lsp.watcher.kind”Type: "recommended" | "polling" | "none"
Default: null
Scopes: global, workspace, workspace folder
Sets how the Biome file watcher behaves. By default, Biome chooses the best watcher strategy for the current operating system, but this can cause issues such as locked folders. Accepted values:
recommended: The default. Chooses the best watcher for the current platform.polling: Uses the polling strategy.none: Disables the watcher. Biome no longer records changes to files, which can affect lint rules that rely on updated types or paths.
biome.lsp.watcher.pollingInterval
Section titled “biome.lsp.watcher.pollingInterval”Type: number
Default: null
Scopes: global, workspace, workspace folder
Polling interval of the polling watcher, in milliseconds. When the setting is null, Biome polls every 2000 milliseconds.
© 2023-present Biome developers and contributors.