I follow the doc and created a script definition, ...
# scripting
s
I follow the doc and created a script definition, however my idea can't recognize any script file. I remember 3 years ago idea can auto detect script definitions from project, did something changed? How can I make idea autocomplete with my script definition?
i
The most reliable way is to create an IntelliJ plugin that implements
kotlin.script.experimental.intellij.ScriptDefinitionsProvider
(and registers the implementation). As a quick-hack you can use Settings -> Build, Execution, Deployment -> Compiler -> Kotlin Compiler and enter definition FQN and classpath into the last two fields (they might be unlabeled due to the bug) You can turn on detection of the definition from the project classpath, but you have to opt-in for it manually, either by setting
isStandalone(false)
in the definition or by using
-Xallow-any-scripts-in-source-roots
compiler options (some details)
s
What is the format for FQN? just class name?
i
package.name.ClassName