Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

Create a configuration file. #3

@FedericoPonzi

Description

@FedericoPonzi

My idea is to mimic what rustfmt is doing more or less: https://rust-lang.github.io/rustfmt/?version=v1.6.0&search=


TLA+-formatter is designed to be very configurable. You can create a TOML file called tlaplusfmt.toml or .tlaplusfmt.toml, place it in the project or any other parent directory and it will apply the options in that file. If none of these directories contain such a file, both your home directory and a directory called tlaplusfmt in your global config directory (e.g. .config/tlaplusfmt/) are checked as well.

A possible content of tlaplusfmt.toml or .tlaplusfmt.toml might look like this:

indent_style = "Block"
reorder_imports = false

Each configuration option is either stable or unstable. Stable options can always be used, while unstable options are only available on a nightly toolchain and must be opted into. To enable unstable options, set unstable_features = true in tlaplusfmt.toml or pass --unstable-features to tlaplusfmt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions