Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Enforcing auto-formatting is a common practice in my experience. Currently working on a project where the repo will refuse commits that are not following the repo-specific formatting settings.

I think it is a sane default in 2024.



No, it isn't. And anyway, I downloaded a generic text editor which has no idea of what autoformatting settings are applicable to my repos (maybe it differs per repo?), yet is trying to autoformat anyway? For example, it decided to replace ' characters in a YAML file with ". WTF? The _default_ setting should be to save as-is.


Evidently this is all very new to you, sounding slightly histrionic.

The zed complaint is purely about it be auto enabled. For each language there is usually a standard and at least one tool. Most people want formatting and can’t stands code bases where sometimes it’s a single quote, sometimes a double quote.


> maybe it differs per repo

Then you'll already have a formatter config file in the root of your repo, and the formatter that Zed runs will use those settings.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: