Skip to content

Support .toml file extension on .cargo/config #7273

Closed
@anp

Description

@anp

Describe the problem you are trying to solve

To have syntax highlighting in VSCode I currently create a custom file association in my settings:

    "files.associations": {
        "**/.cargo/config": "toml"
    },

I'd love to not have to do this!

Describe the solution you'd like

Could cargo accept .cargo/config.toml as a path for local configuration?

Notes

There are many alternatives available, like making the Rust editor plugins aware of this association. However, cargo's usage of TOML elsewhere is identified by the file extension (consistency), and this change would presumably improve ergonomics in other places that do syntax highlighting, not just in editors (availability).

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions