Description
openedon Aug 14, 2024
VS Code allows extensions to create settings with predetermined options based on a list of presets. The Contribution Points page's Configuration property schema subsection documents how to do that using the enum
/ enumDescriptions
/ markdownEnumDescriptions
/ enumItemLabels
properties. But given how funky the schema is, it would be best to properly specify that part.
Here are a number of specific issues:
- There is no code example of
enumItemLabels
. enum
is mentioned but not specified.markdownEnumDescriptions
is not mentioned in the title.- "will be rendered as Markdown" would be more accurate as "will be parsed as Markdown".
- The relationship between these 4 properties is unspecified. What happens if both
markdownEnumDescriptions
andenumDescriptions
are set, for instance?
Also, the following:
The
workbench.iconTheme
setting uses bothenumDescriptions
andenumItemLabels.
In the screenshot below, the hovered option has the item label "None", with enum description "No file icons" and enum valuenull
.
…would be clearer as:
For example, the
workbench.iconTheme
setting shown below uses bothenumDescriptions
andenumItemLabels
. In this screenshot, the hovered option has the item label "None", with enum description "No file icons" andenum
valuenull
.
I wish this report is the occasion for a general review of that section but understand that the scope is a little wide. Feel free to consider this as solved once the first specific issue is solved. I will file different tickets for any remaining problems if needed.