VSCode Biome Monorepo
An unofficial VS Code extension that enables Biome formatting in monorepo environments.
Unlike the official plugin, this extension maps Biome binaries to monorepo workspaces to configure projects that will work properly.
Therefore, this plugin will be maintained until the official plugin supports this functionality.
Usage
- If the official Biome plugin is installed, it should be disabled before using this plugin as there may be conflicts.
- Open the monorepo root folder or the parent folder of multiple projects in VSCode.
- Add Biome-related settings to the configuration file (.vscode/settings.json) of the opened monorepo root folder. For detailed information about settings, please refer to the official documentation.
- If you modify any biome.json file, please restart the plugin.
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "fronterior.biome-monorepo",
"editor.codeActionsOnSave": {
"source.fixAll.biome": "explicit",
"source.organizeImports.biome": "explicit"
}
}
⚠️ Warning: Unlike version 0.0.3, it now works without copying biome.json to the root path!
How It Works
- The Biome LSP proxy server searches for biome.json files in the workspaceFolders paths provided by VSCode during server initialization.
- Therefore, if only the monorepo root folder is open in VSCode, it skips searching for biome.json in subdirectories and uses the root configuration instead.
- To prevent this, this plugin overrides VSCode's workspaceFolders with paths to projects that have Biome installed, ensuring each folder's biome.json is used.
Features
- Automatic Project Detection: Automatically detects Biome projects in monorepo workspaces
- Per-Project Binary Management: Each project uses its own Biome version and configuration
- Multiple LSP Servers: Runs separate Language Server Protocol instances for each Biome project
Commands
Biome Monorepo: Restart - Restart all Biome LSP sessions
Biome Monorepo: Show Output Channel - Show the Biome Monorepo output channel
Biome Monorepo: Fix all auto-fixable Problems - Fix all auto-fixable Problems in focused file
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
Plans
- [x] Connect appropriate biome.json per file
- [x] Automatic plugin restart when needed
- [ ] Windows binary temporary file optimization
- [ ] Yarn PnP support
Acknowledgments
Based on the official Biome VS Code Extension by the Biome team.
License
MIT