does the kotlinc repl mode support tab completion ...
# announcements
c
does the kotlinc repl mode support tab completion somehow?
🚫 1
n
If the Kotlin REPL is used in IntelliJ then some code editor features are available (eg code completion). The terminal version of the Kotlin REPL is very primitive (crippled) compared to the IntelliJ version.
g
I would recommend to use new Kotlin Scratch files features. Scratch files support full-blown code completion and all the features of Kotlin Plugin + can be executed in Repl mode
✔️ 1
c
yeah thats great, but it would also be cool if i could just ship a repl with my app, like for example rails does
g
Not sure how this related to you original question about kotlinc repl. Maybe you could explain your usecase. You can have own runtime repl in your application using Kotlin scripting and jsr-223 support, but not sure what is best way to get tooling support in this case, maybe better to share you usecase in #C0BT46EL8
c
well ruby has
irb
, and a lot of ruby apps just ship a wrapper around irb that sets the library path to their classes and starts irb. which is also possible with kotlinc, but without autocompletion its not very useful
g
You can do exactly the same with scratch files, if I understood you correctly. Create Kotlin scratch, choose module and write code with class path of this module.
It’s not easily possible with raw jar, as I understand, you need a project. But probably support of this use case would be a good feature. Also at some point will be available as part of new scripting (with support of script dependencies), should work even now, but you have to configure Script definition in Idea manually, no easy way to ship script definition and limited tooling support
c
yeah scratch files are great, but i want something that i can run from the shell, its more an admin tool than a development tool
g
There are some plans for Kotlin Rep improvement including autocomplete related to improved Kotlin scripting, nothing specific for now: https://github.com/Kotlin/KEEP/blob/scripting/proposals/scripting-support.md#status-of-this-document
👍 1
c
thanks!
g
Be free to share your usecase about this feature: https://github.com/Kotlin/KEEP/issues/75