daplf/vscode-java-kotlin

Support go to definition from java to kotlin

Opened this issue · 0 comments

daplf commented

When we request a definition of a kotlin symbol, we are taken to the bytecode rather than the source code.

We can probably fix this by adding a contentProvider. This requires us to implement a IContentProvider or IDecompiler that finds the name of the symbol we're trying to fetch and provides the kotlin source file for it. Finding the source file is trickier in Kotlin, since kotlin source files can contain multiple classes (and each one generates a different .class file). I would suggest we delegate this to the kotlin language server somehow. As such, the content provider would need to communicate with the KLS to fetch the definition of the symbol.