anoma / juvix

A language for intent-centric and declarative decentralised applications
https://docs.juvix.org
GNU General Public License v3.0
457 stars 53 forks source link

Repeated reformatting of multi-line comments resulting in them moving to the right #3143

Open heueristik opened 2 weeks ago

heueristik commented 2 weeks ago

Describe the bug

To Reproduce Steps to reproduce the behavior:

Write a multiline comment in a function body, e.g.,

myfun (a : Nat) : Bool :=
  {-
  My comment.
  -}
  true;

and format the file.

  1. Formatting:

    myfun (a : Nat) : Bool :=
    {-
    My comment.
    -}
    true;
  2. Formatting:

    myfun (a : Nat) : Bool :=
    {-
      My comment.
      -}
    true;
  3. Formatting:

    myfun (a : Nat) : Bool :=
    {-
        My comment.
        -}
    true;