Kotlin / kotlin-jupyter

Kotlin kernel for Jupyter/IPython
Apache License 2.0
1.09k stars 106 forks source link

Autocomplete for functions does not show parameters first #400

Open cmelchior opened 1 year ago

cmelchior commented 1 year ago

One of the strengths of Kotlin as a typed language is the discoverability of the API shape, which is more accessible than for dynamic languages.

However, that seems a bit broken in Jupyter where you don't get any help for parameters, but have to discover them yourself through documentation or samples.

Example with Dataframes:

image

The first argument to DataFrame.readCSV( is required and is one of 4 options. However, that is impossible to tell from the huge list of autocomplete options and you can only discover this through documentation.

If you do know the name of the parameter, you can get it to show up, e.g like this:

image

But that is hardly ideal.

Compare this to IntelliJ which shows it like this:

image

Which is much easier to digest and act upon.

This issue https://github.com/Kotlin/kotlin-jupyter/issues/17 does mention that the current autocomplete is a bit dumb, but it was also closed. So I thought I would open this issue to track improving the autocomplete.

ileasile commented 1 year ago

You can try to use Kotlin Notebook plugin. Essentially it's the same kernel, but inside IDE. https://plugins.jetbrains.com/plugin/16340-kotlin-notebook Now it's actively developed, so EAP version may be a bit outdated, but still