You could look at the actual Kotlin project. As it provides the Kotlin plugin it actually supports running an intellij instance with the local version of the plugin. You could probably do the same although spelonking through the kotlin project source code will take some time.