-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add formatters for Elm, Haskell, Python, and TypeScript #12096
base: master
Are you sure you want to change the base?
Conversation
I am not sure making biome default for the JavaScript family is a good idea, the real standard is Prettier, and that does a whole load of other languages too. The only problem with Prettier as an amazing default is it is a bit slow, but that is changing soon and Prettier 4 will be much faster, so it will definitely be the best default then: https://prettier.io/blog/2023/11/30/cli-deep-dive |
In the meantime use prettierd |
I personally use biome but this is correct. Prettier maybe slow but as it stands, it's the de facto standard. Plus last I checked status of biome it wasn't fully compatible with prettier. |
Hm, I figured people are swinging towards Biome, and it would be better to set it as the default given there is none set now than to use Prettier and swap it out later. As of last year when they won the Prettier challenge, Biome had already hit 96% compatibility with Prettier. I updated the PR since I appear to be the outlier here. |
I think there are too many alternatives for some of these to make these the formatters for the languages. For example I use |
These are simply defaults not 'the' formatters. Helix differs from other editors by providing nice defaults rather than leaving a completely blank slate for the user to deal with. Users that have a different preference can set their own, as I and others will do for |
I will even add that it would be nice for helix to configure multiple formatters, if it makes sense for the language So there will be a default one, but switching to another is just one line of config |
If defaults are necessary, they should align with the most widely used formatter. In this case, Prettier is the clear choice, as it is already installed by the majority of users. |
This commit adds `elm-format` for Elm, `ormolu` for Haskell, `ruff` for Python (with `black` as a backup), and `prettier` (with `biome` and `deno` as backups) for TypeScript, Javascript, TSX, JSX, etc.
The documentation specifies how to add a local
This was included in the first update to the PR a couple of days ago. |
This commit adds
elm-format
for Elm,ormolu
for Haskell,ruff
for Python, andprettier
for TypeScript, Javascript, TSX, JSX, etc.