You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the Cabal document says, Cabal allows redundant leading (and trailing) commas since 2.2. And some tools such as cabal-fmt use leading commas by default. However, the indentation of such leading commas does not work very well. For example,
build-depends:
, bar
, foo
When indenting the last line, we may expect
build-depends:
, bar
, foo
However, haskell-cabal-indent-line gives
build-depends:
, bar
, foo
This is a little annoying. I am not sure if this is caused by my incorrect usage. However, I tried checking if there was a leading comma before indenting and taking different indent strategies, which worked as expected. (Of course, there are still corner cases such as multiple blank lines. But the origin code does not handle them very well either...) I will make a PR if it is OK.
The text was updated successfully, but these errors were encountered:
As the Cabal document says, Cabal allows redundant leading (and trailing) commas since 2.2. And some tools such as cabal-fmt use leading commas by default. However, the indentation of such leading commas does not work very well. For example,
When indenting the last line, we may expect
However,
haskell-cabal-indent-line
givesThis is a little annoying. I am not sure if this is caused by my incorrect usage. However, I tried checking if there was a leading comma before indenting and taking different indent strategies, which worked as expected. (Of course, there are still corner cases such as multiple blank lines. But the origin code does not handle them very well either...) I will make a PR if it is OK.
The text was updated successfully, but these errors were encountered: