Do compiler plugins have the ability to generate d...
# compiler
g
Do compiler plugins have the ability to generate documentation that can be viewed in the autocomplete menu of IntelliJ? Or would that require an IntelliJ plugin?
a
Aren’t docs just comments?
g
Well my understanding of documentation comments in Kotlin is they are just special forms of comments with an expected format that are associated with a particular declaration. In any case what I want is to be able to do is attach doc comments to functions that are dynamically generated in the FIR from a K2 compiler plugin such that the comments are rendered by IntelliJ's context completion menu. Right now the menu recognizes the generated functions but the ide can find no source declaration to link that to, which is true because it was generated in the compiler. So I imagine there would have to be some special mechanism to support that behavior if it was supported (Not sure if it is). I'm 98% confident it could be done with an IntelliJ plugin, but I would prefer to not have to write a second plugin (especially one that is not portable with respect to IDE. A small minority of my coworkers really don't want to use JetBrains IDEs 😞 )
For anyone wondering about this, see the following: https://kotlinlang.slack.com/archives/C03PK0PE257/p1712750706873749