this post was submitted on 27 Feb 2024
201 points (95.9% liked)

Programming

17438 readers
257 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] QuadriLiteral 8 points 8 months ago (1 children)

If I wrote an IDE and detected tabs I'd just have it delete the codebase

[–] [email protected] 7 points 8 months ago (3 children)

It was more than just tab conversion. For example, it decided on its own that:

if(...) {
    ...
}
else {
    ...
}

would look better like:

if(...) {
    ...
} else {
    ...
}

I mean I guess I could live with that, but really? I imagine there's some config where you can disable all this, but it just doesn't seem worth some giant git commit every time I touch a file with the editor.

[–] [email protected] 6 points 8 months ago

Ah I think I found it. I need to go:

{
    "format_on_save": "off"
}
[–] [email protected] 3 points 8 months ago

My guess is that it has that default because they use Rust. Everyone uses rustfmt so everything looks the same and if you always format before a commit you never get massive diffs.

Most rust projects I've seen even have a ci job to check the formatting with rustfmt.