Skip to content

Commit 31ac09e

Browse files
committed
Document style preference for comment width more clearly
I guess this explains why rust.vim sets things the way it does?
1 parent e59eac7 commit 31ac09e

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

rustfmt.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
edition = "2024"
22
style_edition = "2024"
33

4-
# Hard tabs provide significant accessibility benefits over Rust's preferred 4-space indentation.
4+
# xt deviates from The Rust Style Guide in two notable ways.
5+
6+
# First, hard tabs can provide substantial accessibility benefits over a strict space count.
57
# See e.g. https://redd.it/c8drjo, https://github.com/prettier/prettier/issues/7475#issuecomment-668544890.
68
hard_tabs = true
9+
10+
# Second, it's easier and more readable to wrap all comments at a maximum of 100 columns, rather
11+
# than the style guide's complicated "80 characters up to the maximum width of 100, whichever is
12+
# smaller" rule. The rustfmt tracking issue for the unstable "comment_width" option shows broad
13+
# agreement with this. Since this is unstable in rustfmt, I'm documenting the style preference
14+
# without any explicit setting change.

0 commit comments

Comments
 (0)