biomejs / biome-zed

Biome extension for Zed
https://biomejs.dev
MIT License
127 stars 4 forks source link

Format on save doesn't work #13

Closed Lirrrx closed 4 months ago

Lirrrx commented 4 months ago

biome.json

{
  "$schema": "https://biomejs.dev/schemas/1.7.1/schema.json",
  "formatter": {
    "enabled": true,
    "formatWithErrors": false,
    "indentStyle": "space",
    "indentWidth": 2,
    "lineEnding": "lf",
    "lineWidth": 80,
    "attributePosition": "auto"
  },
    "javascript": {
        "formatter": {
      "enabled": true,
            "quoteStyle": "single"
        }
    },
  "organizeImports": { "enabled": true },
  "linter": {
    "enabled": true,
    "rules": { "recommended": true }
  }
}

package.json script for formatting: "format": "biome format --write \"src/**/*.ts\" \"test/**/*.ts\"",

zed settings.json

{
  "format_on_save": "on",
  "code_actions_on_format": {
    "source.fixAll": true,
    "source.organizeImports.biome": true
  },
  "formatter": "language_server"
}

When I'm trying to save any file, biome doesn't format it. But I see that biome is work, because in vscode it works fine.

luckydye commented 4 months ago

I also have been trying to figure this problem out, but since zed and extensions have been changing a lot, it's hard to debug what's happening here.

luckydye commented 4 months ago

Thanks for the issue! will continue this in https://github.com/biomejs/biome-zed/issues/5