Skip to content

TOML formatter doesn't respect line length #22

@rminami

Description

@rminami

Version: 0.47.4

I have a dprint.jsonc that looks like this

{
  "toml": {
    "lineWidth": 80
  },
  "excludes": [],
  "plugins": ["https://plugins.dprint.dev/toml-0.6.3.wasm"]
}

and a Cargo.toml file that looks like this.

[package]
name = "playground"
version = "0.1.0"
edition = "2021"

[dependencies]
sqlx = { version = "0.8.2", default-features = false, features = ["chrono", "macros", "postgres", "runtime-tokio-rustls", "uuid"] }

Given the 80 character line width, I would expect dprint to reformat the sqlx line to

sqlx = { version = "0.8.2", default-features = false, features = [
  "chrono",
  "macros",
  "postgres",
  "runtime-tokio-rustls",
  "uuid",
] }

However, it is kept as is. This seems like unintended behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions