diff --git a/src/Nixfmt/Pretty.hs b/src/Nixfmt/Pretty.hs index 24a5406c..b15939be 100644 --- a/src/Nixfmt/Pretty.hs +++ b/src/Nixfmt/Pretty.hs @@ -145,7 +145,7 @@ instance Pretty Binder where group' False $ line <> pretty l <> line <> group' True (pretty TUpdate <> hardspace <> prettyTermWide t) -- Case 2b: LHS fits onto first line, RHS is a function application (Operation l (Ann [] TUpdate Nothing) (Application f a)) -> - line <> (group l) <> line <> prettyApp hardline (pretty TUpdate <> hardspace) mempty hardline f a + line <> (group l) <> line <> prettyApp hardline (pretty TUpdate <> hardspace) mempty mempty f a -- Special case `++` operations to be more compact in some cases -- Case 1: two arguments, LHS is absorbable term, RHS fits onto the last line (Operation (Term t) (Ann [] TConcat Nothing) b) | isAbsorbable t -> @@ -155,7 +155,7 @@ instance Pretty Binder where group' False $ line <> pretty l <> line <> group' True (pretty TConcat <> hardspace <> prettyTermWide t) -- Case 2b: LHS fits onto first line, RHS is a function application (Operation l (Ann [] TConcat Nothing) (Application f a)) -> - line <> (group l) <> line <> prettyApp hardline (pretty TConcat <> hardspace) mempty hardline f a + line <> (group l) <> line <> prettyApp hardline (pretty TConcat <> hardspace) mempty mempty f a -- Everything else: -- If it fits on one line, it fits -- If it fits on one line but with a newline after the `=`, it fits (including semicolon)