# Biome extension for Zed
This extension adds support for [Biome](https://github.com/biomejs/biome) in [Zed](https://zed.dev/).
Languages currently supported:
- **JavaScript**
- **TypeScript**
- **JSX**
- **TSX**
- **JSON**
- **JSONC**
- **Vue.js**
- **Astro**
- **Svelte**
- **CSS**
## Installation
Requires Zed >= **v0.131.0**.
This extension is available in the extensions view inside the Zed editor. Open `zed: extensions` and search for _Biome_.
## Configuration
By default, the biome.json file is required to be in the **root of the workspace**.
Otherwise, it can be configured through the lsp settings:
```jsonc
// settings.json
{
"lsp": {
"biome": {
"settings": {
"config_path": "/biome.json"
}
}
}
}
```
### Formatting
To use the language server as a formatter, specify biome as your formatter in the settings:
```jsonc
// settings.json
{
"formatter": {
"language_server": {
"name": "biome"
}
}
}
```
### Enable biome only when biome.json is present
```jsonc
// settings.json
{
"lsp": {
"biome": {
"settings": {
"require_config_file": true
}
}
}
}
```
### Project based configuration
If you'd like to exclude biome from running in every project,
1. Disable the biome language server in user settings:
```jsonc
// settings.json
{
"language_servers": [ "!biome", "..." ]
}
```
2. And enable it in the project's local settings:
```jsonc
// /.zed/settings.json
{
"language_servers": [ "biome", "..." ]
}
```
The same can be configured on a per-language basis with the [`languages`](https://zed.dev/docs/configuring-zed#languages) key.
### Run code actions on format:
```jsonc
// settings.json
{
"code_actions_on_format": {
"source.fixAll.biome": true,
"source.organizeImports.biome": true
}
}
```