I have a question about compiler plugins. I unders...
# compiler
w
I have a question about compiler plugins. I understood at kotlin conf that information from the k2 compiler can now be used by intellij. I used the compiler plugin template as a starter but cannot see any generated code highlighted in intellij. Where can i find some more information?
m
There is an option to set in IJ. I'm AFK right now but if you look up the metro jnstall docs you'll find it
It's about including non bundled plugins
h
You need to set
kotlin.k2.only.bundled.compiler.plugins.enabled
to false in the IntelliJ registry.
thank you color 1
w
Is it still required to build an IntelliJ plugin. Or is only a Gradle plugin suficient?
m
Yes, the one from Philip above, thanks 🙏 !
@Willem Veelenturf if you're building a Kotlin compiler plugin the autocomplete will come out of the box.
(this is the metro installation page I was mentioning earlier)
h
Also, it is very unstable and you might need to update your plugin to beta versions. 2025.2 already uses Kotlin 2.2.20 internally, so you need to update your plugin too.
w
I still dont see code highlighting in IntelliJ • I have a working plugin: https://github.com/flock-community/kmapper • Update IntelliJ to the latest EAP release • Set the flag
kotlin.k2.only.bundled.compiler.plugins.enabled
to false
h
I only use Gradle to add the compiler plugin, and via the Gradle Sync, IntelliJ is able to get the compiler plugin too. No idea how it works with the IntelliJ build system, if at all.
plus one 1
w
Tnx, I will setup a Gradle plugin to test it
I got it to work! Tnx for your help.
Where can I find more information about doing the same for maven