-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Cannot format temporary buffers #460
Comments
I believe that's expected because the buffer doesn't have any language assigned to it. From the instructions, it seems you haven't assigned it, which is something you can usually do before saving an Untitled file. Please try to do so. |
The language was detected to be JSON. I didn't assign explicitly, but VSCode automatically infers the language from the contents. |
That's not the same, if you don't assign a language, the LSP will receive no language identifier, and Biome won't be able to handle it. Can you please show a screenshot of the VSCode file before saving? |
I can't replicate the issue. Considering the instructions, the reason why in your case you have an issue is becase Biome isn't installed globally (you can't see "Biome" on the bottom right). Even though your settings want to use Biome by default, the extension can't because it can't find any binary. |
Strange you can't replicate the issue 🤔 As for your guess that "Biome isn't installed globally": I have the Biome CLI installed through I am using VSCode Insiders in case that might impact the behaviour (perhaps with some experimental lazy loading?). I'll see if I can try and narrow down the cause in case it is an extension on my end and/or a setting. |
I tried with both the stable and the insiders versions of VS Code. In the stable version, I can format the Untitled file using the In the Insiders version (1.97.0), the In both cases, it doesn't show |
VS Code version
1.97.0-insider
Extension version
2024.12.22126
Biome version
1.9.4
Operating system
Description
Biome is not an available formatter when there is no corresponding file (yet).
Steps to reproduce
Once the document is saved, repeating steps (1)-(4) will show Biome as available, even if the new buffer remains unsaved/in-memory.
Expected behavior
It would be nice if Biome just works for temporary buffers from the start, instead of requiring it to be saved first.
Does this issue occur when using the CLI directly?
Not sure / Not applicable
Link to a minimal reproduction
N/A (no files needed, see steps above)
Logs
No response
The text was updated successfully, but these errors were encountered: