haskell-language-server icon indicating copy to clipboard operation
haskell-language-server copied to clipboard

Format all `.cabal` files in the repo with a cabal formatter

Open fendor opened this issue 1 year ago • 3 comments

As noticed in https://github.com/haskell/haskell-language-server/pull/4224#discussion_r1597873736, non-standard formatting can make it harder to read and .cabal file.

We have now at least two good options for formatting .cabal files that we both support in HLS itself:

  • cabal-gild
  • cabal-fmt

Perhaps we should start using these formatters in HLS and add new CI jobs that make sure all our .cabal files are formatted accordingly.

If the output of the formatter looks unwieldy to us, we should reach out to the projects and discuss improvements.

fendor avatar May 13 '24 07:05 fendor

Personally, I prefer the styling of cabal-fmt, but https://github.com/phadej/cabal-fmt/pull/82 makes cabal-fmt more difficult to use from HLS directly. Thus, I am in favour of cabal-gild for formatting our .cabal files, but don't have any strong opinions right now.

fendor avatar May 13 '24 07:05 fendor

Maybe open a PR that does the change so we can look at the diffs and discuss there?

michaelpj avatar May 13 '24 09:05 michaelpj

See #4229 and #4230

fendor avatar May 13 '24 09:05 fendor