Skip to content

Improve heuristics for declarations #170

@jgardn3r

Description

@jgardn3r

At the moment, const declarations and some type declarations are all formatted in the same way (when forced to wrap).

const
  A: TRec = (
      A: 1;
      B: 2
  );
  A: array of TRec = (
      (
          A: 1;
          B: 2
      )
  );
  // This one is weird/wrong
  A =
      (
              18
                  + 1)
          / 2;
type
  A = (
      A,
      B
  );

All of these constructs are different and should be treated slightly differently. Improving the heuristics would produce better formatting in the case of the expression to improve consistency across the formatter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions