vscode-kotlin icon indicating copy to clipboard operation
vscode-kotlin copied to clipboard

F12/Go to Definition fails for stdlib

Open dboreham opened this issue 2 years ago • 2 comments

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

dboreham avatar Apr 14 '22 20:04 dboreham

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.

daplf avatar Apr 14 '22 22:04 daplf

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.

dboreham avatar Apr 14 '22 22:04 dboreham