Rust Digger: More than 14% of crates configure rustfmt. 35 have both rustfmt.toml and .rustfmt.toml (rust-digger.code-maven.com)
from snaggen@programming.dev to rust@programming.dev on 03 Apr 2024 20:01
https://programming.dev/post/12336219

Do you customize your rustfmt, and in what way?

#rust

threaded - newest

sugar_in_your_tea@sh.itjust.works on 04 Apr 2024 02:06 next collapse

Nah, defaults are fine for me.

snaggen@programming.dev on 04 Apr 2024 05:09 collapse

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@programming.dev on 04 Apr 2024 09:59 collapse

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.

BB_C@programming.dev on 04 Apr 2024 09:00 next collapse

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.

sugar_in_your_tea@sh.itjust.works on 04 Apr 2024 14:29 next collapse

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.

voklen@programming.dev on 05 Apr 2024 09:40 next collapse

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

hard_tabs = true
natecox@programming.dev on 05 Apr 2024 22:07 collapse

This is the way

driverdone@lemmy.ml on 09 Apr 2024 10:21 collapse

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