Zed extension
Biome’s official Zed extension adds formatting, linting, and code fixes to Zed. This page covers how the extension finds Biome and every setting it accepts.
To install the extension and set up formatting and fixes on save, see Set up your editor.
Biome binary
Section titled “Biome binary”The extension requires Zed v0.131.0 or later. It runs the Biome binary and looks for a Biome installation in the following order:
- The path specified in Zed’s configuration, for example:
{ "lsp": { "biome": { "binary": { "path": "/path/to/biome", "arguments": [ "lsp-proxy" ] } } }}- Biome installed locally through
package.json. - Biome installed system-wide in
PATH.
If none of them exists, the extension asks Zed to install Biome with npm and uses that installation.
Settings
Section titled “Settings”Set the following settings under lsp.biome.settings in your Zed settings.
config_path
Section titled “config_path”Type: string
Default: null
Path to a custom configuration file. If unset, Biome uses the default configuration file.
{ "lsp": { "biome": { "settings": { "config_path": "<path>/biome.json" } } }}require_config_file
Section titled “require_config_file”Type: boolean
Default: false
Requires a configuration file before the extension enables Biome. When set to true, the extension enables Biome only if a biome.json file is present in the project.
{ "lsp": { "biome": { "settings": { "require_config_file": true } } }}inline_config
Section titled “inline_config”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:
{ "lsp": { "biome": { "settings": { "inline_config": { "linter": { "rules": { "suspicious": { "noConsole": "off" } } } } } } }}goto_definition
Section titled “goto_definition”Type: boolean
Default: false
Enables the go-to definition feature in the editor.
{ "lsp": { "biome": { "settings": { "goto_definition": true } } }}Disable Biome for a language
Section titled “Disable Biome for a language”To exclude Biome for a given language (for example, GraphQL) in a project, add !biome to its language servers:
{ "languages": { "GraphQL": { "language_servers": [ "!biome", "..." ] } }}Avoid global settings
Section titled “Avoid global settings”Do not add biome to the top-level language_servers, formatter, or code_actions_on_format keys in your Zed settings.json. Setting Biome globally can break languages that Biome does not support, such as Rust or Python. Configure it per language instead, for the languages Biome supports.
© 2023-present Biome developers and contributors.