fwcd / fwcd/kotlin-language-server

Definitions on JDK and Kotlin Standard Library

Open
#308 1 comment 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
2k
Forks
252
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at server/src/main/kotlin/org/javacs/kt/CompiledFile.kt:67 and trace how definitions are collected for classpath symbols. Investigate the Kotlin standard library descriptors marked NO_SOURCE and the JDK path, then define and verify behavior for definitions, decompilation, and any available source jars.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.