Skip to content

Experimental support for importing Kotlin code into Java projects via a JDT.LS extension

License

Notifications You must be signed in to change notification settings

daplf/vscode-java-kotlin

Repository files navigation

VSCode Extension for Java + Kotlin

A VSCode extension that enhances vscode-java and vscode-kotlin with Java + Kotlin interoperability. This uses a JDT LS extension with a delegate command handler that can work together with the Kotlin Language Server, in order for Java code to have access to Kotlin code.

To use, make sure to have the Kotlin extension installed and to have code generation enabled in your VSCode settings:

{
  "kotlin.codegen.enabled": true
}

Disclaimer: This is very experimental, but it seems to work for small maven and gradle projects at least.

Features

  • Java + Kotlin project compilation
  • Kotlin symbols available in completions when writing Java code

Development

For now, to set this up, you need to run the build.sh script in this directory to package the JDT LS extension. Afterwards, you should run npm install to install the extension dependencies.

To debug, you can use F5 on VSCode, as with any other extension. To package the extension you can use vsce package.

About

Experimental support for importing Kotlin code into Java projects via a JDT.LS extension

Resources

License

Stars

Watchers

Forks

Packages

No packages published