vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

Comments removed when formatting

Open krazik opened this issue 7 years ago • 8 comments

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

krazik avatar Aug 03 '17 01:08 krazik

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.

adamvoss avatar Aug 03 '17 01:08 adamvoss

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

-Ry

krazik avatar Aug 05 '17 19:08 krazik

Reopening as a placeholder to try to reduce issue duplication.

adamvoss avatar Aug 24 '17 23:08 adamvoss

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

txomon avatar Oct 08 '17 23:10 txomon

@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.

adamvoss avatar Oct 11 '17 01:10 adamvoss

+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.

ecstasy2 avatar Nov 29 '17 22:11 ecstasy2

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

fullc0ntr0l avatar Mar 20 '18 13:03 fullc0ntr0l

@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.

BYK avatar Jul 19 '19 17:07 BYK