stylish-haskell icon indicating copy to clipboard operation
stylish-haskell copied to clipboard

`deriving` alignment for enums

Open Lev135 opened this issue 1 year ago • 0 comments

Is there a way to align deriving close at the next line? With default options (if we uncomment format records rules formatter change

data Tmp1 = A | B | C
  deriving (Show, Eq)

to

data Tmp1 = A | B | C deriving (Eq, Show)

This becomes more ugly with large enums:

data DefType = DefTEnv | DefTPref | DefTCmd | DefTInl | DefTMode | DefTSort deriving
    ( Eq
    , Ord
    , Show
    )

instead of

data DefType = DefTEnv | DefTPref | DefTCmd | DefTInl | DefTMode | DefTSort 
  deriving( Eq, Ord, Show)

Maybe I'm doing something wrong, but I cannot see an option to manage this behavior

Lev135 avatar Sep 25 '22 13:09 Lev135