PsiLanguageInjectionHost with custom language variables?

in Bash there is the concept of a heredoc, i.e. a range of text which might be of another language which may be evaluated with Bash variable replacements.
For example:

export VAR="hello word"
cat - << XML
          This is the value of a bash var: $VAR

I've implemented a PsiLanguageInjectionHost for the heredoc psi element.
But that way I lose my references to the bash variable $VAR.

How can I inject another language and still insert my own variables / PSI elements at certain places without breaking the parsing of the injected language?


Please sign in to leave a comment.