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

Autocomplete: is it possible to sort enums/defaults above tags in the suggestion list?

Open adam-coster opened this issue 3 years ago • 1 comments

Summary

I use JSON Schema to specify my YAML structure, and frequently use enum types as values. This allows VSCode to populate my autocomplete suggestions with the list of possible values for a given field.

However, the suggestions always show a list of a dozen or so tags first, so the values I actually want are always at the bottom of the suggestion list.

Is there a way to have this extension sort its autocompletes such that the tags are listed after the enums/defaults?

adam-coster avatar Jun 01 '22 16:06 adam-coster

We are not really specifying a priority order for completion items it is sorted according to the alphabetical order. The ! character puts custom tags on top. There is no API to force an order to CompletionItems but I think we can set the sortOrder field for custom tags expilicty without !.

gorkem avatar Jun 03 '22 20:06 gorkem