Skip to content

🐛 editor.formatOnSave only works if set in language-specific configuration blocks #401

Closed as not planned
@hood

Description

@hood

VS Code version

1.95.0-insider

Extension version

v2024.10.131712 (pre-release)

Biome version

1.9.3

Operating system

  • Windows
  • macOS
  • Linux

Description

The following configuration, setting biome as a project-wide formatted, won’t work.

{
  "editor.formatOnSave": true,
  "editor.formatOnSaveMode": "file",
  "biome.enabled": true,
  "editor.defaultFormatter": "biomejs.biome"
}

If set on a per-language basis, Biome will actually start formatting files automatically.

(Example)

{
  "editor.formatOnSave": true,
  "editor.formatOnSaveMode": "file",
  "biome.enabled": true,
  "[typescriptreact]": {
    "editor.defaultFormatter": "biomejs.biome"
  },
  "[typescript]": {
    "editor.defaultFormatter": "biomejs.biome"
  },
}

Steps to reproduce

{
  "editor.formatOnSave": true,
  "editor.formatOnSaveMode": "file",
  "biome.enabled": true,
  "editor.defaultFormatter": "biomejs.biome"
}

Expected behavior

Should automatically format files when configured to do so.

Does this issue occur when using the CLI directly?

Not sure / Not applicable

Link to a minimal reproduction

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions