I was about to start writing a new mode, but couldn’t find in documentation answers to two questions:
- What are the recognized values for token styles?
- Which one I need to return for a given language token?
Question 1 is partially answered by a list of CSS rules in
codemirror.css. Only partially because CSS rules hardly pass for a definitive list of semantic options.
As for question 2, for some token types it’s pretty straightforward, e.g. I can easily infer what should be marked as
keyword. For others - it’s very ambiguous or even not obvious at all: what kinds of brackets qualify for
bracket. What is
variable-2 and how it’s different from
def supposed to be?
Could someone please point me to a relevant documentation?