Skip to content

Comments that should not be moved between leading comma and element #72

@brandon-leapyear

Description

@brandon-leapyear

We have comments that separate out elements in our list, like

[ foo1
  -- bars are below here
, bar1
, bar2
, bar3
  -- bazes below here
, baz1
, baz2
]

but Fourmolu reformats this to

[ foo1
, -- bars below here
  bar1
, bar2
, bar3
, -- bazes below here
  baz1
, baz2
]

which is weird because it seems like it's commenting that specific element rather than everything after that point. Ormolu doesn't have this problem because it doesn't have the leading commas

-- ormolu
[ foo1,
  -- bars below here
  bar1,
  bar2,
  -- bazes below here
  baz1,
  baz2
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions