Skip to content

πŸ› Error when organizing importΒ #104

@TheOrdinaryWow

Description

@TheOrdinaryWow

Zed version

Zed 0.185.15 – /Applications/Zed.app

Extension version

v0.15

Biome version

1.9.4

Operating system

  • Windows
  • macOS
  • Linux

Description

In all my TypeScript projects, biome plugin failed to organize imports.

This issue has been annoyed me for months. Reintall zed nor biome extension does not help.

partial zed configuration is below.

{
  "format_on_save":"on",
  "formatter":{
    "language_server":{
      "name":"biome"
    }
  },
  "languages":{
    "JavaScript":{
      "inlay_hints":{
        "enabled":true,
        "show_parameter_hints":true,
        "maxLength":120,
        "show_other_hints":true,
        "show_type_hints":false,
        "edit_debounce_ms":100,
        "scroll_debounce_ms":50
      },
      "code_actions_on_format":{
        "source.fixAll.biome":true,
        "source.organizeImports.biome":true,
        "source.organizeImports":true
      }
    },
    "TypeScript":{
      "inlay_hints":{
        "enabled":true,
        "show_parameter_hints":true,
        "maxLength":120,
        "show_other_hints":true,
        "show_type_hints":false,
        "edit_debounce_ms":100,
        "scroll_debounce_ms":50
      },
      "code_actions_on_format":{
        "source.fixAll.biome":true,
        "source.organizeImports.biome":true,
        "source.organizeImports":true
      }
    },
    "TSX":{
      "inlay_hints":{
        "enabled":true,
        "show_parameter_hints":true,
        "maxLength":120,
        "show_other_hints":true,
        "show_type_hints":false,
        "edit_debounce_ms":100,
        "scroll_debounce_ms":50
      },
      "code_actions_on_format":{
        "source.fixAll.biome":true,
        "source.organizeImports.biome":true,
        "source.organizeImports":true
      }
    }
  },
  "lsp":{
    "biome":{
      "settings":{
        "require_config_file":false
      }
    }
  }
}

biome configuration below.

{
  "$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
  "organizeImports": {
    "enabled": true,
    "ignore": ["src/components/ui/**/*", "src/components/aceternity/**/*", "src/routeTree.gen.ts"]
  },
  "vcs": {
    "enabled": true,
    "clientKind": "git",
    "useIgnoreFile": true
  },
  "formatter": {
    "indentStyle": "space",
    "attributePosition": "auto",
    "indentWidth": 2,
    "lineWidth": 160,
    "lineEnding": "lf",
    "ignore": ["src/components/aceternity/**/*", "src/routeTree.gen.ts"]
  },
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true
    },
    "ignore": ["src/components/ui/**/*", "src/components/aceternity/**/*", "src/routeTree.gen.ts", "src/sections/instances/$id/xterm/(lib|addon).ts"]
  },
  "javascript": {
    "formatter": {
      "quoteStyle": "double",
      "arrowParentheses": "always",
      "bracketSameLine": false,
      "bracketSpacing": true,
      "jsxQuoteStyle": "double",
      "quoteProperties": "asNeeded",
      "semicolons": "always",
      "trailingCommas": "all"
    }
  },
  "json": {
    "formatter": {
      "trailingCommas": "none"
    }
  }
}

Steps to reproduce

As below.

CleanShot.2025-05-12.at.12.04.12.-.01.mp4

Expected behavior

Should organize properly.

Does this issue occur when using the CLI directly?

No

Link to a minimal reproduction

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageIssue needs to be triaged

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions