this post was submitted on 03 Apr 2024
28 points (96.7% liked)

Rust

6011 readers
2 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
 

Do you customize your rustfmt, and in what way?

top 8 comments
sorted by: hot top controversial new old
[–] [email protected] 6 points 7 months ago (1 children)

Nah, defaults are fine for me.

[–] snaggen 8 points 7 months ago (1 children)

I also think the defaults are fine, so I was quite surprised to see 14% modify the settings. That is much higher than I expected.

[–] snaggen 2 points 7 months ago

Now when I look in to it, it seems that the things I would like to adjust is mostly formatting of imports, and most of these options seems to still be unstable.

[–] voklen 4 points 7 months ago (1 children)

In every project I have exactly one line to use tabs:

hard_tabs = true
[–] natecox 3 points 7 months ago

This is the way

[–] BB_C 4 points 7 months ago

Other than a couple already mentioned, I like match_block_trailing_comma. Besides the symmetry, trailing commas in general are good for potentially reducing diffs in the future.

But really, I'm not that bothered.

[–] [email protected] 3 points 7 months ago* (last edited 7 months ago)

VCS hosts

GitHub has a massive majority here with "no repository" being larger than any competitor (a lot of those are probably Github, just not in the toml file).

This makes me sad. I wish alternatives to GitHub were more popular because it just adds that much more friction for a project to move if they have legitimate reasons to want something else.

I think GitHub is fine, but I'm using something else just because GitHub has so much market presence. I wish more people did the same.

[–] [email protected] 1 points 7 months ago

I tend to set use_small_heuristics to max. Because ut annoys me when the it doesn't use the full line width when it could