tweag / ormolu

A formatter for Haskell source code
https://ormolu-live.tweag.io
Other
950 stars 83 forks source link

Lookup of `.ormolu` files is tied to `.cabal` files, resulting in duplication #1019

Closed amesgen closed 1 year ago

amesgen commented 1 year ago

Is your feature request related to a problem? Please describe. Right now, .ormolu files have to reside next to a .cabal file.

Fixities can also be overridden if .ormolu file is found next to the corresponding Cabal file, i.e. they should be siblings in the same directory.

Actually, this has to be the "nearest" .cabal file, which can be annoying in a repository with a lot of packages/.cabal files, as you then need one .ormolu file (can be a symlink) per .cabal file for it to apply to all source files.

An example for this is https://github.com/wireapp/wire-server, which currently contains 51 .ormolu files.

Describe the solution you'd like One approach: We could look for .ormolu files separately from .cabal files.