3

I wonder is there any way to get kotlin docs working like java ones(javadocs) with Intellij?

I was trying to look for a way but so far haven't found one. For java we can specify local docs or even web docs and use them under our keyboard shortcut for example ctrl + q, ctrl + j. Maven/gradle is also able to help us with java when there are docs available it can download them for us, it doesn't work for kotlin.

For example: HashMap quick doc in IDE

RMachnik
  • 3,598
  • 1
  • 34
  • 51
  • Sorry, it's not clear to me what functionality is missing exactly. Can you describe your use case in more detail please (maybe with a screenshot)? – Alexey Belkov May 12 '20 at 12:43
  • Please see updated question. – RMachnik May 12 '20 at 17:10
  • I mean, what exactly are you trying to do? How do you expect to add the docs? Kotlin should work similar to Java. For example, for the following code `ctrl+q` works for `println`: `fun main() { println("hello") }` – Alexey Belkov May 13 '20 at 12:04
  • I expect docs to be available like for java when you have sources for library for instance. Example `javalin-3.7.0-sources.jar`. I don't see such jar for kotlin. – RMachnik May 13 '20 at 16:54
  • It works for me in a sample Gradle project. I added `compile "io.javalin:javalin:3.8.0"` to dependencies. The sources jar was downloaded automatically and added to the IDEA module dependency. Now for `import io.javalin.websocket.JavalinWsServlet` quick documentation works properly, sources of `JavalinWsServlet` are available for navigation. If it doesn't work for you, can you please create an issue at http://kotl.in/issue with a sample project to reproduce? Thank you. – Alexey Belkov May 14 '20 at 09:35

0 Answers0