# IntelliJ Language Injection for the annotation strings

**URL:** <https://discuss.kotlinlang.org/t/intellij-language-injection-for-the-annotation-strings/5149>\
**Category:** Support\
**Created:** [October 27, 2017, 4:18pm UTC](https://discuss.kotlinlang.org/t/intellij-language-injection-for-the-annotation-strings/5149 "2017-10-27T16:18:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![youhansr](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/youhansr/32/4052_2.png) [@youhansr](https://discuss.kotlinlang.org/u/youhansr)\
**Post date:** [October 27, 2017, 4:18pm UTC](https://discuss.kotlinlang.org/t/intellij-language-injection-for-the-annotation-strings/5149/1 "2017-10-27T16:18:21Z")

</div>

Currently IntelliJ support Language Injection for SQL and JPAQL in Java classes and especially in annotations like `NamedQuery` which is a very handy feature to read and validate SQL and JPAQL codes right inside Java.

Unfortunately IntelliJ supports language injection for Kotlin language partially and we can’t use this feature in Kotlin annotations.

There is a workaround for this problem by using `// language=JPAQL` comment above your annotation. But the problem is, all other strings after the annotation will be treated as JPAQL language as well, which will cause many IDE errors in Kotlin file.

The IntelliJ rules for language injections is in **Preferences=\>Editor=\>Language Injections** path. Is there a way to define a rule to support language injection for Kotlin annotations strings? Or we must wait to support this feature by future Kotlin Plugin releases.
