about summary refs log tree commit diff
path: root/.rustfmt.toml
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-08-02T00·12+0100
committertazjin <mail@tazj.in>2020-08-02T21·57+0000
commit1faab130040a3bcb205cf682c8b39ac881ad9b3e (patch)
tree609350f764f86199130409971d45ab3b8a194442 /.rustfmt.toml
parent56cba6e032e8087dc21702a6826d606501869c8d (diff)
feat: Add rustfmt configuration for the whole depot r/1550
Most settings are left at the defaults.

There are a few more that we want, but even though a stable rustfmt is
perfectly capable of dumping them into a config file, it can not
actually use them.

I expect this will be mostly agreeable, with the exception of
`combine_control_expr`.

Change-Id: I66e3b4705e24dbba902e8847397365fcf31dd403
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1555
Tested-by: BuildkiteCI
Reviewed-by: kanepyork <rikingcoding@gmail.com>
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to '.rustfmt.toml')
-rw-r--r--.rustfmt.toml22
1 files changed, 22 insertions, 0 deletions
diff --git a/.rustfmt.toml b/.rustfmt.toml
new file mode 100644
index 0000000000..6ad0d5341a
--- /dev/null
+++ b/.rustfmt.toml
@@ -0,0 +1,22 @@
+# This configuration file changes some defaults from the ones
+# documented on https://rust-lang.github.io/rustfmt/
+#
+# All other settings are left at the defaults.
+
+edition = "2018"
+newline_style = "Unix"
+use_try_shorthand = true
+
+# Unstable settings that we want in the future, once they are
+# available:
+#
+# combine_control_expr = false
+# comment_width = 100
+# condense_wildcard_suffixes = true
+# format_code_in_doc_comments = true
+# inline_attribute_width = 100
+# match_block_trailing_comma = true
+# merge_imports = true
+# normalize_comments = true
+# overflow_delimited_expr = true
+# wrap_comments = true