Skip to content

Extend config option similar to package.json prettier field #5313

Open
@ZelCloud

Description

@ZelCloud

Request

Could we get a field to specify a rustfmt.toml configuration either within cargo.toml or rustfmt.toml

example:

#cargo.toml

rustfmt-extends = { git = "https://github.com/some-global-rustfmt-config", branch = "main" }

Rational

I'm working on multiple backend micro-services in rust. In every single repo I'd like to have the exact same styling / formatting. Currently I'm copying over the rustfmt.toml file to each repo and if there's a configuration change I or someone else on my team makes we end up copying over the new file to all the repos. Ideally it would be nice if we could just point to a github repo and a rustfmt.toml and have cargo pull it down and rustfmt use it.

This is similar to what formatters like prettier allow for frontend repos. (ex. npm i some-prettier-config)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions