Document the global rustfmt.toml feature.

This commit is contained in:
Mara Bos 2019-01-07 20:57:02 +01:00
parent 24daa174ca
commit 13db34fb95

View file

@ -1,6 +1,6 @@
# Configuring Rustfmt
Rustfmt is designed to be very configurable. You can create a TOML file called `rustfmt.toml` or `.rustfmt.toml`, place it in the project or any other parent directory and it will apply the options in that file.
Rustfmt is designed to be very configurable. You can create a TOML file called `rustfmt.toml` or `.rustfmt.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, your [global config directory](https://docs.rs/dirs/1.0.4/dirs/fn.config_dir.html) is checked for a folder called `rustfmt`, which may contain a `rustfmt.toml` (e.g. `~/.config/rustfmt/rustfmt.toml`).
A possible content of `rustfmt.toml` or `.rustfmt.toml` might look like this: