radian-software / apheleia

🌷 Run code formatter on buffer contents without moving point, using RCS patches and dynamic programming.
MIT License
523 stars 74 forks source link

replace haskell formatter? #219

Closed edslocomb closed 9 months ago

edslocomb commented 9 months ago

Apheleia's default haskell formatter, brittany, is no longer maintained as of a bit under a year ago.

I learned this while trying to run a full make fmt-docker, which failed on the brittany test; I was unable to get the installer working and it looks like even brittany's author has had issues with installation.

I'd propose removing brittany from apheleia and replacing it with another haskell formatter. A brief bit of looking around turned up hindent and ormolu.

I'll have a go at adding formatters for those, but I'm not a haskell dev and don't have an opinion about which should be the new default.

Any input appreciated?

zzantares commented 9 months ago

Please consider setting either fourmolu or ourmolu as the default Haskell formatter, I'd say these are the most widely used ones for industrial Haskell code today.

BTW these are pretty much identical except that fourmolu is less opinionated and allows customization while ormolu doesn't.

raxod502 commented 9 months ago

https://github.com/radian-software/apheleia/pull/221, merged, adds those two formatters. https://github.com/radian-software/apheleia/pull/222 fixes the brittany installation (it was just a matter of the ubuntu version being too old, though I agree with the brittany author that haskell package installation is a mess). I'd like to wait at least a little time after the new formatters are added to Apheleia (say, 3 months?) before switching to make one of them the default though. Just to give people a chance to try them out before swapping it for everyone.