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
This is incredibly minor but I think the unindentation of the comment is aesthetically a bit sad. It would be more consistent for that comment to be indented one scope.
Extra information
The formatted result breaks by code.
The formatted result gives compiler warnings.
I or my company would be willing to help fix this.
Thanks for filing this, @Smaug123. The MultilineBlockBracketsOnSameColumn option has since been renamed/replaced by MultilineBracketStyle = Aligned, but the trivia indentation issue you describe — a line comment inside a list item appearing at the bracket level rather than the item level — is a known category of trivia handling bug in Fantomas.
The root cause is that when the comment trivia is attached to the list item node in the Oak representation, the indentation context applied to the comment comes from the bracket scope rather than the item scope. This is a non-trivial fix in the trivia attribution logic in ASTTransformer.fs.
The issue is still open and still relevant. If anyone wants to look at it, the place to start is how mkExprListOrArray in ASTTransformer.fs attributes trivia to list elements — specifically trailing comments on items before the closing bracket.
Activity
github-actions commentedon Mar 30, 2026
🤖 This is an automated response from Repo Assist.
Thanks for filing this,
@Smaug123. TheMultilineBlockBracketsOnSameColumnoption has since been renamed/replaced byMultilineBracketStyle = Aligned, but the trivia indentation issue you describe — a line comment inside a list item appearing at the bracket level rather than the item level — is a known category of trivia handling bug in Fantomas.The root cause is that when the comment trivia is attached to the list item node in the Oak representation, the indentation context applied to the comment comes from the bracket scope rather than the item scope. This is a non-trivial fix in the trivia attribution logic in
ASTTransformer.fs.The issue is still open and still relevant. If anyone wants to look at it, the place to start is how
mkExprListOrArrayinASTTransformer.fsattributes trivia to list elements — specifically trailing comments on items before the closing bracket.Fix trailing blank line when file ends with comment, add regression …
Bump the dotnet-sidecars group with 6 updates (#257)
Bump the packages group with 5 updates (#106)
Bump the packages group with 6 updates (#84)