Integrate Biome in your editor
First-party plugins
Section titled First-party pluginsThese are plugins that are maintained by the Biome team and part of the Biome organization.
VS Code
Section titled VS CodeThe Biome editor integration allows you to:
- Format files on save or when issuing the Format command.
- Lint files and apply code fixes
Install our official Biome VS Code extension from the Visual Studio Marketplace.
To make Biome the default formatter open a supported file and:
- open the Command Palette (View or Ctrl/⌘+⇧+P)
- select Format Document With…
- select Configure Default Formatter
- select Biome.
IntelliJ
Section titled IntelliJTo install the Biome IntelliJ plugin, head over to official plugin page or follow these steps:
From JetBrains IDEs:
- Open IntelliJ IDEA.
- Go to Settings/Preferences.
- Select Plugins from the left-hand menu.
- Click on the Marketplace tab.
- Search for “Biome” and click Install.
- Restart the IDE to activate the plugin.
From disk:
- Download the plugin .zip from releases tab.
- Press
⌘Сmd,
to open the IDE settings and then select Plugins. - On the Plugins page, click The Settings button and then click Install Plugin from Disk….
Third-party plugins
Section titled Third-party pluginsThese are plugin maintained by other communities, that you install in your editor:
neovim
: you’ll have to installnvim-lspconfig
, and follow the instructions;helix
: follow the instruction of this manualcoc-biome
: Biome extension forcoc.nvim
sublime text
: follow theLSP-biome
installation instructionsEmacs
: ensure you havelsp-mode
installed, follow thelsp-biome
installation instructions to enable Biome support inlsp-mode
Write your own plugin
Section titled Write your own pluginBiome has LSP first-class support. If your editor does implement LSP, then the integration of Biome should be seamless.
Use the LSP proxy
Section titled Use the LSP proxyBiome has a command called lsp-proxy
. When executed, Biome will spawn two processes:
- a daemon that does execute the requested operations;
- a server that functions as a proxy between the requests of the client - the editor - and the server - the daemon;
If your editor is able to interact with a server and send JSON-RPC request, you only need to configure the editor run that command.
You can check how the neo-vim biome plugin
does it.
Use stdin
Section titled Use stdinIf your editor doesn’t support LSP, you use directly the binary biome
and call it using standard input.
The following commands can be called via standard input:
Biome will return the new output (or the original output if changes haven’t occurred) to standard output and the diagnostics to standard error.
When you use stdin
, you must pass the --stdin-file-path
option. The file path
doesn’t need to exist in your file system, it can be any name. What’s important is to provide the correct file extension, so Biome knows how to treat your file.
It’s the editor’s responsibility to locate the resolve the path of the binary and then call it when it’s needed. The binaries are shipped to npm based on the architectures and OS that we support:
@biomejs/cli-darwin-arm64
@biomejs/cli-darwin-x64
@biomejs/cli-linux-arm64
@biomejs/cli-linux-x64
@biomejs/cli-win32-arm64
@biomejs/cli-win32-x64
The binary name is biome
or biome.exe
, and it can be found in the root directory of the library, e.g.: @biomejs/cli-darwin-arm64/biome
, @biomejs/cli-win32-x64/biome.exe
.
Use the daemon with the binary
Section titled Use the daemon with the binaryUsing the binary via CLI is very efficient, although you won’t be able to provide logs to your users. The CLI allows you to bootstrap a daemon and then use the CLI commands through the daemon itself.
If order to do so, you first need to start a daemon process with the start
command:
biome start
Then, every command needs to add the --use-server
options, e.g.:
echo "console.log('')" | biome format --use-server --stdin-file-path=dummy.js
Daemon logs
Section titled Daemon logsThe Biome daemon saves logs in your file system. Logs are stored in a folder called biome-logs
. The path of this folder changes based on your operative system:
- Linux:
~/.cache/biome
; - Windows:
C:\Users\<UserName>\AppData\Local\biomejs\biome\cache
- macOS:
/Users/<UserName>/Library/Caches/dev.biomejs.biome
For other operative systems, you can find the folder in the system’s temporary directory.
To obtain the precise path, execute the following command:
biome explain daemon-logs
The log files are rotated on an hourly basis.