Skip to content

🐛 Cannot format temporary buffers #460

@JP-Ellis

Description

@JP-Ellis

VS Code version

1.97.0-insider

Extension version

2024.12.22126

Biome version

1.9.4

Operating system

  • Windows
  • macOS
  • Linux

Description

Biome is not an available formatter when there is no corresponding file (yet).

Steps to reproduce

  1. Open VSCode
  2. Create a new 'Untitled' tab
  3. Add some JSON content. For example:
    {
      "hello": "word",
         "foo": 1, "bar": 2
    }
  4. In the command palette, go to "Format document with..." and note that Biome is not available.
  5. Save the document, and try (4) again. Note that Biome is available.

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

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions