vscode-yaml
vscode-yaml copied to clipboard
Sort feature
Hi,
It would be nice to add a keys sorting feature. I use this a lot under Atom for my locale translations files: https://github.com/elledienne/easysort-yaml
I'd love to see this as well. For the time being I can sometimes get away with converting YAML to JSON and sorting the result, but it's a pretty silly kludge.
This is actually needed to minimize conflicts during merges. Keeping lists/dicts sorted helps a lot to minimize diffs.
This works identically to the atom plugin: https://github.com/pascalre/vscode-yaml-sort @phyllisstein, @prokher, @gdlx.
There is already a good solution for this on the marketplace. I am not sure if there are any advantages to duplicating that functionality in this extension.
Can you please reopen this? vscode-yaml-sortremoves comments on sorting which IMHO is a reason to not use it: https://github.com/pascalre/vscode-yaml-sort/issues/39
I'd therefore be really thankful if vscode-yaml could provide a better sorting solution
is there any update about this enhancement? 🙏
I also really need this feature. If there is no plan from the owner of this repo, I can try to implement and send a pr.
This was fixed with https://github.com/redhat-developer/yaml-language-server/pull/839 please give it a try.
This was fixed with redhat-developer/yaml-language-server#839 please give it a try.
Hi @gorkem, thanks for the great feature. Just want to ensure whether it is sort keys on format supported? Seems I failed to make it though it is mentioned to have a code action in the pull request.