-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
This call:
list(
# comment0
foo # comment1
=1, bar # comment2
= # comment3
# comment4
2 #comment5
#comment6
, #comment7
#comment8
)Is currently formatted as:
list(
# comment0
# comment1
foo = 1,
# comment3
# comment4
# comment2
bar = 2, #comment5 #comment7
#comment8
#comment6
)We need to fix these issues:
-
comment2is pulled down because it becomes a leading comment of the whole argument node -
comment6is pulled down because it becomes a leading comment of the empty argument, I think because it's an own-line and the default placement puts it on the next node. -
comment7is formatted on the same line ascomment5, because they both become trailing comments of the same node, and both havelines_before = 0. This happens here:air/crates/air_r_formatter/src/comments.rs
Line 951 in e3655e9
return CommentPlacement::trailing(previous, comment);
Metadata
Metadata
Assignees
Labels
No labels