How to force highlighter to parse all the document?
Hi everyone,
Normally the highlighter will parse the part where the document changed. Sometimes I need the highlighter to parse the whole document.
Is there a way to force the highligter to go through all the document?
Thanks.
Please sign in to leave a comment.
DaemonCodeAnalyzer.restart(PsiFile)
That didn't work for me, I tried executing this:
On the following cases:
Is there anything I'm missing?
Which highlighter do you mean exactly? Lexer highlighting or annotators/inspections?
The lexer one. Is there a way to make it go through the document? or do I have to use an annotator as a workaround?
The lexer highlighter is not intended to be used for any highlighting that depends on anything else other than the text of the document. If you need to update the highlighting based on some other conditions, then using an annotator is the correct solution, not just a workaround.