How to properly do semantic highlighting?

I'm looking over the JavaScriptLanguage sources and see that
a lot of the editor highllighting is done at the lexer level.

What's the best way to do semantic highlighting? For example,
giving different text attributes to a variable name depending on
whether it is a read or a write access.

Is it done through the Annotator? Or would I be abusing the role
of the Anotator if I did it that way?

Thanks,

Vince.


2 comments
Comment actions Permalink

Yep. Annotator should be used for both semantic level highlighting and PSI-level analysis error highlighting.

0
Comment actions Permalink

Thanks Max.

Vince.


0

Please sign in to leave a comment.