Custom language: Can I postprocess the PSI tree?

in my custom language plugin I need to treat certain areas of a file as "verbatim", i.e. the highlighting of tokens should be supressed.

1. Can I remove the textattributes of tokens somehow? This way the verbatim block does not contain the invalid highlighting of keywords found by the lexer.


2. Is there a way to postprocess a PSI tree to manually fix up the psi structure?

I can't do this in the lexer because the position of the verbatim areas are the result of parsing previous instructions.

Thanks a lot,

1 comment
Comment actions Permalink

How about Annotator?
Idea calls it at a final stage of language processing, so you can change color, font, etc of the text in the editor.



Please sign in to leave a comment.