Skip to content

Flatten code action removes comments #848

Description

@MrQubo

Describe the bug

"Flatten nested attribute set" code action removes comments from code.

To Reproduce

{
  a = {
    b =
      # IMPORTANT COMMENT
      2;
  };
}

Put cursor on a and run "Flatten nested attribute set" code action.
Result:

{
  a.b = 2;
}

Expected behavior

{
  a.b =
    # IMPORTANT COMMENT
    2;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions