Skip to content

feature request: Organize import using Biome.js for typescript, javascript, typescriptreact, javascriptreact #585

Open
@rahulpeacock

Description

@rahulpeacock

Did you check existing requests?

  • I have searched the existing issues

Describe the feature

I want to organize the imports using biome.js when I format my buffer/file using biome.js for typescript, javascript, typescriptreact, javascriptreact

Provide background

No response

What is the significance of this feature?

strongly desired

Additional details

For now I am using the args to organize the imports. But it is highly recommend to have a config to organize the imports using biome

This is a workaround for now

-- confirm.lua
return {
  {
    "stevearc/conform.nvim",
    opts = {
      formatters_by_ft = {
        lua = { "stylua" },
        ["javascript"] = { "biome" },
        ["javascriptreact"] = { "biome" },
        ["typescript"] = { "biome" },
        ["typescriptreact"] = { "biome" },
        ["json"] = { "biome" },
        ["css"] = { "biome" },
      },
      formatters = {
        biome = {
          command = "biome",
          args = { "check", "--formatter-enabled=true", "--linter-enabled=false", "--organize-imports-enabled=true", "--write", "--stdin-file-path", "$FILENAME" },
        },
      },
    },
  },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions