fourmolu / fourmolu

A fourk of ormolu that uses four space indentation and allows arbitrary configuration. Don't like it? PRs welcome!
https://fourmolu.github.io/
Other
356 stars 62 forks source link

Add a configuration file #2

Closed parsonsmatt closed 4 years ago

parsonsmatt commented 4 years ago

It should be possible to configure fourmolu.

A great initial choice would be the amount of space in the indentation.

I'm not picky on the file format. Dhall might be cool? Yaml is a safe bet.

chreekat commented 4 years ago

(Is this part of the joke?)

parsonsmatt commented 4 years ago

I will happily accept a PR introducing a config file and I will also happily release it on hackage, as a joke, or seriously. Whether you laugh or cry is up to you!

runeksvendsen commented 4 years ago

@chreekat It’s either config file, or 6 months from now we’ll have sixty different ormolu-forks, each one with a slightly different way to format something that should have been configurable in the first place.

georgefst commented 4 years ago

I'm going to implement this next. As much as I like dhall, it seems a bit much for what we actually need, so I'll go with YAML as the obvious choice.

Obviously we want to be able to configure the indentation. The one other thing that springs to mind right now would be a strict 'ormolu emulation' flag, which for now would just roll back the minor change we've had to make due to #1 (do block in the LHS of an infix operator).