You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @huxuan , the customSortKeywords does only apply for keywords and not for list items. I will keep this issue open, for a feature to custom sort lists.
Tangentially related. I was trying to sort some infrastructure-as-code YAML with a custom sort definition that started with name. It would have been really nice if the array sort had sorted my list of services by values the sorted keys. However, I think that in many situations that would make no sense at all, so I don't know exactly how to define a good sort order.
Example
services:
- name: footype: api
- name: bartype: worker
When my custom sort definition is name or name, type, I'd like this to be sorted as:
services:
- name: bartype: worker
- name: footype: api
When my custom sort definition is type or type, name, I'd like this to be sorted as:
services:
- type: apiname: foo
- type: workername: bar
When enable both
Use Custom Sort Recursively
andSort Arrays
, it is supposed to apply custom sort arrays but actually not.For example:
When enable both
Use Custom Sort Recursively
andSort Arrays
, with effective custom sort keys:it will be formatted as following instead which is supposed to keep the original order.
BTW, objects work as expected.
The text was updated successfully, but these errors were encountered: