biomejs / biome-zed

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

Plugin doesn't work #61

Closed coolemur closed 1 week ago

coolemur commented 1 week ago

Zed version: Zed 0.134.4 & Zed Preview 0.162.1 Biome-zed plugin: v0.1.3

According to https://zed.dev/docs/configuring-zed#formatter this should work, but it doesn't work:

  "languages": {
    "Svelte": {
        "formatter": {
          "code_actions": {
            "source.fixAll.biome": true,
            "source.organizeImports.biome": true
          }
        }
      }
    }

This also doesn't work:

  "languages": {
    "Svelte": {
        "code_actions_on_format": {
          "source.fixAll.biome": true,
          "source.organizeImports.biome": true
        }
      }
    }

Adding these settings to root for all languages also doesn't work:

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

While running external command works:

  "languages": {
    "Svelte": {
        "formatter": {
          "external": {
            "command": "./node_modules/@biomejs/biome/bin/biome",
            "arguments": [
              "check",
              "--write",
              "--stdin-file-path",
              "{buffer_path}"
            ]
          }
        }
      }
    }

Am I doing something wrong or this Plugin is currently broken?

ematipico commented 1 week ago

I wouldn't exclude that zed is at fault here.

I also tried it yesterday but I couldn't get it to work, however the linting works, and code actions too. So it's about formatting specifically.

chanpod commented 1 week ago

For what it's worth

"formatter": { "language_server": { "name": "biome" } },

Worked for me but only after I restarted zed.