How to make my own HighlightVisitor access javascript's PsiElement in HTML script tag?

0
2 comments

Can you clarify a little bit what do you mean by access? If you want `visitJSClass`, `visitJSFunctionDeclaration` to be called, your HighlightingVisitor should extend JSElementVisitor or you'll get generic `visitElement`.

Also make sure that you're using IntelliJ Ultimate as an SDK, as Community edition doesn't support JavaScript parsing.

0

In development, If we still want to use Community edition sdk of Intellij, we could find the jar files in side the installation path of
IntelliJ Ultimate (In mac, maybe like: /Applications/IntelliJ\ IDEA\ 2018.1\ EAP.app/Contents/plugins/JavaScriptLanguage/lib/) , copy those jar files into your project dir, add the jar files to your project. But note: Your `HighlightVisitor` will not work for Inteiilj Community edition.

0

Please sign in to leave a comment.