kotlin-language-server icon indicating copy to clipboard operation
kotlin-language-server copied to clipboard

Definitions on JDK and Kotlin Standard Library

Open daplf opened this issue 4 years ago • 1 comments

At the moment, definitions don't work for symbols in the JDK and the Kotlin standard library (not even through decompiling).

The kotlin standard library jars are included as any other jars in the classpath, but the compiler has the descriptors with the source set to NO_SOURCE, which leads to it not being able to find the files.

For the symbols in the JDK, it never even gets that far. BindingContext.getSliceContents returns an empty list here: https://github.com/fwcd/kotlin-language-server/blob/main/server/src/main/kotlin/org/javacs/kt/CompiledFile.kt#L67

Supporting this would be cool. Supporting source jars for the JDK might also require some additional work, since I'm not sure maven will give us these through the sources goal.

daplf avatar Sep 30 '21 10:09 daplf

Note that JDK symbol lookup has already shipped a while ago in #339, but I'll leave this open to track progress on support for definitions in the Kotlin standard library.

fwcd avatar Oct 03 '23 23:10 fwcd