My IntelliJ plugin contains a script definition via an EP and it's recognized by IntelliJ (shows up properly in list of scripts in settings). However, highlighting fails because IntelliJ throws a class not found exception about the configured implicit receiver. Interestingly, it's using the kotlin plugin's classloader to try and load implicit receiver class for some reason. While debugging, I noticed that I could probably somehow make IJ use a custom url classloader (with the kotlin one as a parent) if I add JARs to the
hostConfiguration
somehow. Does that sound like the right approach? My ScriptDefinitionsProvider already tells IJ where to find the single JAR that contains all necessary classes, so why does it only load the script Def but not the implicit receiver class properly?