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

Is there an "Indent Children" Argument for Formatting #143

Closed
devstein opened this issue Mar 19, 2020 · 2 comments · Fixed by #147
Closed

Is there an "Indent Children" Argument for Formatting #143

devstein opened this issue Mar 19, 2020 · 2 comments · Fixed by #147
Labels
enhancement New feature or request

Comments

@devstein
Copy link

From what I understand, prettier uses this package to format yaml files but the default it formats by given children the same indentation as their parent.

parent:
- child: 1
- child: 2

But I would like the format to indent all children:

parent:
    - child: 1
    - child: 2

Is there a flag for this? Or is this specific to the the prettier project.

For reference, I want to use this project for autoformatting but maintain the behavior of yaml_formatter_indent_collection flag in the vim-yaml-formatter

@eemeli
Copy link
Owner

eemeli commented Mar 19, 2020

There is not yet a flag for the indent formatting, but it would be a good idea. Prettier uses the lower-level CST API of this library, and builds their own formatter on top of that.

@eemeli eemeli added the enhancement New feature or request label Mar 19, 2020
@devstein
Copy link
Author

@eemeli Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants