Biome is a powerful tool designed to enhance your development experience. This plugin integrates seamlessly with many JetBrains IDE's to provide the following capabilities.
- 💡 See lints while you type
- 👨💻 Apply code fixes
- 🚧 Reformat your code
- 💾 Automatically applying code fixes on save
To install the Biome IntelliJ plugin, head over to the official plugin page or follow these steps:
- 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.
- Download the plugin .zip from the releases tab.
- Press ⌘Cmd + , to open the IDE settings and then select Plugins.
- On the Plugins page, click the Settings button and then click Install Plugin from Disk….
The plugin tries to use Biome from your project’s local dependencies (node_modules/.bin/biome
). We recommend adding Biome as a project dependency to ensure that NPM scripts and the extension use the same Biome version.
You can also explicitly specify the biome
binary the extension should use by configuring the Biome CLI Path
in Settings
->Language & Frameworks
->Biome Settings
.
In Automatic Biome configuration
mode, the plugin will look for a biome configuration file upwards from the current file. If it doesn't find one, it will stop LSP server.
There are several reasons to behave like this:
- In IDEA with multiple projects in one code base it sound reasonable to disable LSP server if there is no biome configuration file in the project.
- In multi-root workspace, we should run biome from proper working directory, so that
include
andexclude
paths are resolved correctly. - As currently LSP server proxy doesn't provide option to work with multiple configs, we should provide path to the biome configuration file and restart LSP server once active file is changed.
This setting overrides the Biome binary used by the plugin.
This plugin is currently supported in the following IDEs:
Biome CLI comes with many commands and options, so you can use only what you need.
Apply code fixes by either hovering over the relevant section and selecting the suggested fix, pressing ⌥+⏎(Option+Enter) or Alt+Enter.
To reformat your code, use the keyboard shortcut ⌥⇧+⌘+L or Ctrl+Alt+L. Alternatively, you can configure your IDE to format code automatically on save for a seamless coding experience.