The default editing experience when typing out a list of enums isn’t great.
The default editor definition:
gets you this:
Notice that the completion menu does not have entries for individual enums, although you can in fact type them in.
But add the grammar.wrap
cell from grammar cells:
and you get this:
Now you get both the completion menu entries and the ability to type in the values directly.
Resources
Learn more about grammar.wrap
and other grammar cells:
- The original paper describing various kinds of grammar cells and their semantics.
- Grammar cookies – a series of video tutorials by Kolja Dummann.