I'm planning to implement kotlin script runner for...
# announcements
c
I'm planning to implement kotlin script runner for my web application. It will work like this: On the web there is an editor with a text area where one can write a Kotlin script, then this script is autowired from running Spring context and then executed. I want it to be nice, so I decided to implement a web-ide style editor, with syntax highlighting and auto-complete for both language features and existing Spring beans (maybe). So I'm looking for a minimal but extendable web-ide for Kotlin. So far I've found out that try.kotl.in is open-source, and therefore I could strip it down to bare bones that I need and use that, but before I dive down I'd like to know, maybe there is something more atomic, which I can just take instead of digging it out of a larger project?
g
so, with the understanding that I tend to roll my own far too often, I did combine RichTextFX's StyleClassedArea (allows you to specify CSS for substrings in a document) with ANTLR to create something that I think looks pretty good
The thing thats nice about ANTLR (or most parser generators for that matter) it that they intrinsically combine something which can easily be strapped to type information (like a production name or token type) to a text range. At that point you just need a text component powerful enough to let you specify different styles for different text items. My knowledge of HTML and jquery is limited so I'm not certain you can do it with standard jquery text objects, but i cant imagine its too hard to find something that will do the trick
c
Sounds interesting, I'll take a look. Thanks for the suggestion!
j
You can also take a look at Eclipse Che/Eclipse Orion, which has really nice editor integrating with different languages (syntax, autocompletion, etc.) via Language Server Protocol.
However, currently JetBrains has no plans to implement LSP for Kotlin (which is understandable considering tight integration / embedding inside IntelliJ) https://discuss.kotlinlang.org/t/any-plan-for-supporting-language-server-protocol/2471