-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Comments
CC @dsherret what's the complexity of potential solution? Does dprint provide Rust implementation of YAML formatter? |
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. |
Wouldn't https://github.com/ikatyang/tree-sitter-yaml work? |
That looks like it has the functionality, but we'd want to use a rust parser distributed over crates.io. |
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. |
Would love this, it's literally the only reason I still have a |
It looks like deno could use https://github.com/g-plane/pretty_yaml for this. |
Would that be something worth considering?
The text was updated successfully, but these errors were encountered: