In the case of doc comments `{-| -}`, the way elm-format moves them is
indicative of how elm-make and elm-package interpret them, so if elm-format
is moving those, you probably had them in the wrong place.For other comments, there is unfortunately ambiguity in Elm's syntax about what any given comment is meant to be associated with. In general, a `--` comment is associated with the thing before it, unless it starts a new line, and other comments are associated with things before/after depending on what made sense in the parser. There is a guide in progress that will give examples of how comments will be parsed and where to put them if you want to document a particular thing. Thus far there has been little feedback about comment handling, so many of the details have not yet been assessed to determine what is best. You can provide specific examples by submitting issues for elm-format https://github.com/avh4/elm-format/issues On Wed, Jul 5, 2017 at 7:27 PM, Raoul Duke <[email protected]> wrote: > It might make mechanical ascii diffing easier, but it seems to destroy > so many other valuable ux things along the way. > > like, small example that seems to me to be a giant red flag: it moves > my comments around, so they aren't actually next to the thing they are > commenting about?! > > -- > You received this message because you are subscribed to the Google Groups > "Elm Discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
