Inject a custom language into a string literal key in JSProperty

已回答

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

0

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

请先登录再写评论。