Inject a custom language into a string literal key in JSProperty

Answered

Is that possible to inject a custom language into a string literal key in a JSProperty?

0
1 comment

Hi Mikhail,

Languages can be injected into elements implementing PsiLanguageInjectionHost. JavaScript object key type is LeafPsiElement, which does not implement it, so you cannot inject custom language here.

You can inspect the PSI tree with https://plugins.jetbrains.com/docs/intellij/explore-api.html#31-use-internal-mode-and-psiviewer.

0

Please sign in to leave a comment.