fwcd / kotlin-language-server

Kotlin code completion, diagnostics and more for any editor/IDE using the Language Server Protocol
MIT License
1.62k stars 204 forks source link

Make code generation (for Java interoperability) opt-in #585

Closed fwcd closed 1 month ago

fwcd commented 1 month ago

Code generation as implemented in #334 is currently rather experimental and throws a lot of exceptions on recent Kotlin versions. Until this is addressed, it would be a better user experience if we just disable code generation by default and let advanced users opt-in by setting

{
  "kotlin.codegen.enabled": true
}

The downside is that Java interoperability will no longer work without this option, but given that it doesn't really seem to work properly in the current state, I believe making it opt-in and experimental for now would be an improvement over the status quo.

cc @daplf