fwcd / vscode-kotlin

Kotlin code completion, debugging, linting and more for VSCode
MIT License
298 stars 39 forks source link

F12/Go to Definition fails for stdlib #93

Open dboreham opened 2 years ago

dboreham commented 2 years ago

Description

Apologies -- this may well be operator error. I noticed that if I attempt to open the definition source file for identifiers in one of my source files, I see the following:

Selecting "Go to definition" on various kinds of identifier including imported from Java and some Kotlin dependency jars "works" (the relevant source file is opened in the IDE), it sometimes doesn't work (consistently, for specific dependencies) and definitely doesn't work for Kotlin's stdlib.

Wondering if there's a step I've missed to download the sources jar and put it somewhere where it'll be picked up and used in the plugin?

Although I noticed this in a large $dayjob project, I have reproduced it in a minimal project created with gradle init. fwiw using Java (same process : create a project using gradle init then open in VSCode with Java extensions), appears to work ok.

Extension version

1.7.1

daplf commented 2 years ago

Hey @dboreham

This is unfortunately a known issue (see here: https://github.com/fwcd/kotlin-language-server/issues/308). With that said, do you mind specifying the dependencies this doesn't work for? I was only aware of this issue for the kotlin stdlib.

dboreham commented 2 years ago

Ah, apologies -- I did try to review existing open issues for a dup but sadly missed #308.

Another dependency that doesn't work for me is : org.koin.core.component I will do some checking to see if I can find more.