Skip to content

Use sane indentation for flatten and pack code actions #185

Description

@llakala

Starting with this code:

{
  x = {
    y = 2;
    z = 5;
  };
}

If we run the flatten code action, this code is generated:

{
  
    x.y = 2;
    x.z = 5;
  
}

(note the trailing whitespace)

On the other hand, if we start with the flattened version:

{
  x.y = 2;
  x.z = 5;
}

The pack code action generates this:

{
x = {
  y = 2;
  z = 5;
};
}

I'd expect (and hope) it would be fairly simple to correct this. I haven't taken a deep look at the code, but if I get the go-ahead and a little guidance, I can look at making a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-assistArea: assistence/code actionC-featureCatagory: feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions