Remix.run Logo
wartijn_ 4 days ago

Which defaults? The programming languages I’ve worked with don’t have defaults for everything related to formatting. Editor defaults don’t work, since not everybody uses the same editor. So you have to make a choice somewhere.

swiftcoder 4 days ago | parent | next [-]

A lot of (relatively) recent languages do have defaults. Go and rust both come with an auto formatter out of the box, and defaults that are sane enough to just run with

wartijn_ 4 days ago | parent [-]

Ah yeah, in those cases it is possible to just use the defaults. Come to think of it, I have worked with Deno, which comes with a formatter (and linter and testing library) and I’m a fan. Saves a couple of dependencies, some config files and a bit of mental overhead when creating a new project.

stavros 4 days ago | parent | prev | next [-]

I guess the GP means "use an opinionated formatter", I agree with both of you.

genericspammer 4 days ago | parent | prev [-]

Please inform me what the defaults are for Java, C#, C++, C, Bash and Python?

sfn42 4 days ago | parent [-]

As far as C# goes there's `dotnet format`. You can use it as is or provide an `.editorconfig` file to customize it.