Skip to content
New issue

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

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

Already on GitHub? # to your account

Deno fmt for yml files #12217

Closed
razzeee opened this issue Sep 25, 2021 · 7 comments · Fixed by #24717
Closed

Deno fmt for yml files #12217

razzeee opened this issue Sep 25, 2021 · 7 comments · Fixed by #24717
Labels
suggestion suggestions for new features (yet to be agreed)

Comments

@razzeee
Copy link

razzeee commented Sep 25, 2021

Would that be something worth considering?

@bartlomieju
Copy link
Member

CC @dsherret what's the complexity of potential solution? Does dprint provide Rust implementation of YAML formatter?

@bartlomieju bartlomieju added the suggestion suggestions for new features (yet to be agreed) label Oct 5, 2021
@dsherret
Copy link
Member

dsherret commented Oct 9, 2021

It would be a lot of work. I don't see a yaml parser for rust that supports parsing comments and getting spans/ranges of the text.

@razzeee
Copy link
Author

razzeee commented Oct 9, 2021

@dsherret
Copy link
Member

dsherret commented Oct 9, 2021

That looks like it has the functionality, but we'd want to use a rust parser distributed over crates.io.

@razzeee
Copy link
Author

razzeee commented Oct 9, 2021

Agreed, it's fairly simple to let tree-sitter build rust bindings from that (with the latest tree-sitter-cli version). And I have scripts for automatically releasing that to crates.io, but that should be done upstream, so I've opened an issue there.

@jimisaacs
Copy link

Would love this, it's literally the only reason I still have a .prettierrc.yml file in my projects.

@dsherret
Copy link
Member

It looks like deno could use https://github.com/g-plane/pretty_yaml for this.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants