From c0685037103f33f3c737f39ff9b28015b8f247ae Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Fri, 30 Aug 2024 01:50:18 +0200 Subject: [PATCH] WIP --- src/Nixfmt/Pretty.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Nixfmt/Pretty.hs b/src/Nixfmt/Pretty.hs index 120ef92b..9f25902a 100644 --- a/src/Nixfmt/Pretty.hs +++ b/src/Nixfmt/Pretty.hs @@ -375,7 +375,8 @@ instance Pretty Parameter where -- then start on a new line instead". prettyApp :: Bool -> Doc -> Bool -> Expression -> Expression -> Doc prettyApp indentFunction pre hasPost f a = - let absorbApp (Application f' a') = group' Transparent (absorbApp f') <> line <> nest (group' Priority a') + let absorbApp (Application f' a'@(Term Selection {})) = group' Transparent (absorbApp f') <> line <> nest (group' RegularG a') + absorbApp (Application f' a') = group' Transparent (absorbApp f') <> line <> nest (group' Priority a') absorbApp expr | indentFunction && null comment' = nest $ group' RegularG $ line' <> pretty expr | otherwise = pretty expr