Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indentation when printing object/record with attribute #2231

Closed
cknitt opened this issue Oct 17, 2018 · 2 comments
Closed

Indentation when printing object/record with attribute #2231

cknitt opened this issue Oct 17, 2018 · 2 comments
Labels
HIGH PRI Printer things that have to do with turning an AST into Reason code SKILL: MODERATE

Comments

@cknitt
Copy link

cknitt commented Oct 17, 2018

refmt formats as follows:

let obj = [@intl.messages] {
                             "a": {
                               "id": "a",
                               "defaultMessage": "A",
                             },
                           };

Same for records:

let record = [@intl.messages] {
                                a: {
                                  id: "a",
                                  defaultMessage: "A",
                                },
                              };

That's a lot of indentation...

@IwanKaramazow
Copy link
Contributor

What kind of indentation are you looking for?
Like this with a single attribute?

let obj = [@intl.messages] {
 "a": {
   "id": "a",
   "defaultMessage": "A",
 },
};

@IwanKaramazow IwanKaramazow added SKILL: MODERATE HIGH PRI Printer things that have to do with turning an AST into Reason code labels Oct 18, 2018
@cknitt
Copy link
Author

cknitt commented Oct 18, 2018

Yes, I think

let obj = [@intl.messages] {
  "a": {
    "id": "a",
    "defaultMessage": "A",
  },
};

would be best. Something like

let obj = [@intl.messages]
{
  "a": {
    "id": "a",
    "defaultMessage": "A",
  },
};

would work for me, too - anything that does not indent the body that much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HIGH PRI Printer things that have to do with turning an AST into Reason code SKILL: MODERATE
Projects
None yet
Development

No branches or pull requests

3 participants