Format Document command doesn't organize imports with Biome extension #424
Replies: 2 comments
-
Biome format does not organize imports, you have to run biome check Im not sure how this is configured in VSCode as I use something else, but I had this issue and had to make sure biome check was running |
Beta Was this translation helpful? Give feedback.
-
The import sorting isn't part of formatting, and this is part of the LSP. As you might notice the If you come from a different experience (prettier + plugin or eslint + plugin), they don't follow LSP, so that's why you have different expectations. Biome is closer to LSP than other tools. |
Beta Was this translation helpful? Give feedback.
-
When using the Biome pre-release extension in VSCode, the "Format Document" command (
Ctrl/Cmd + Shift + P
> "Format Document" orAlt + Shift + F
) doesn't organize imports automatically, even though organize imports is enabled in the Biome configuration.Environment
Configuration
My VSCode settings (
settings.json
):Expected Behavior
When using the "Format Document" command, it should both format the code and organize imports.
Actual Behavior
The "Format Document" command only formats the code but doesn't organize imports. I need to run the "Organize Imports" command separately.
Additional Information
Steps to Reproduce
Beta Was this translation helpful? Give feedback.
All reactions