adamvoss / vscode-yaml

YAML language support, including JSON Schema validation, for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=adamvoss.yaml
MIT License
29 stars 5 forks source link

Comments removed when formatting #9

Open krazik opened 7 years ago

krazik commented 7 years ago

I can't figure out how to stop it but this plugin removes all comments # Foo from my yaml files.

adamvoss commented 7 years ago

I recognize this is not an ideal solution, but the solution is to not use the code formatting functionality.

The underlying library that provides formatting does not (and will not) support comments. If another workable library can be found that preserves comments, I would be happy to switch.

krazik commented 7 years ago

yeah that sucks I obviously understand too. thanks for the reply.

-Ry

adamvoss commented 7 years ago

Reopening as a placeholder to try to reduce issue duplication.

txomon commented 7 years ago

Would you mind listing this in Known Issues section? Thanks!

adamvoss commented 7 years ago

@txomon That is a good idea. It will require a new release of vscode-yaml in order to show on the marketplace and I'm currently working on some potentially big changes regarding this extension, so I might let some of that hash out in the next couple days first.

ecstasy2 commented 6 years ago

+1 This is a deal breaker for me. Yaml is code and code need documentation. It would be nice if we can find a alternative.

fullc0ntr0l commented 6 years ago

https://github.com/mohsen1/yawn-yaml

BYK commented 5 years ago

@adamvoss is there any possibility to replace the parser witn yawn-yaml as @fullc0ntr0l suggested? I can open a PR if you are okay with the idea.