Go to Definition' (gd) isn't working for Java's Standard Library using jdtls #14155
Replies: 3 comments 2 replies
-
|
What does the Helix log look like when running in verbose mode and using I expect that this is #11500 - for the standard library if the path is within an archive then we don't currently support opening the file. I expect that the response to the goto-definition response would have a |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
@sjoerdschouten I wrote a wrapper to solve this problem. Please take a look if you're still interested: https://github.com/quantonganh/jdtls-wrapper |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
When using 'go to definition' (
gd) on standard Java library types, likejava.util.List, it simply doesn't work. While JDTLS (the language server) should. support this feature and hover (space k) works fine, logs from both JDTLS and Helix indicate Helix isn't sending the requiredtextDocument/definitionrequest.Reproduction Steps
Start a Standard Maven Project
Open your terminal and create a basic Maven project with the following commands:
mvn -B archetype:generate -DgroupId=com.example -DartifactId=my-app -Dversion=1.0.0 -DinteractiveMode=false cd my-appCreate or Update src/main/java/com/example/Main.java
First, remove
App.javaif it's present. Then, create or updatesrc/main/java/com/example/Main.javawith the following code:Adjust pom.xml
Ensure your pom.xml file is targeting your JDK version (21 in my case) by replacing its content with the following:
Set up languages.toml
Create a languages.toml file in your
my-appdirectory to configure JDTLS and enable detailed logging for both JDTLS and Helix:Launch Helix and Test
From the
my-appdirectory, launch Helix with trace-level logging:hx --log trace .src/main/java/com/example/Main.java.What Should Happen (Expected Behavior)
Helix should send a
textDocument/definitionrequest to JDTLS and navigate to thejava.util.Listsource (usually located insrc.zip).What Actually Happens (Actual Behavior)
Nothing occurs. Helix displays "No definition found" in the status bar.
Helix log
helix log
jdtls logs
Platform
MacOS Sequoia 15.5 (24F74)
Terminal Emulator
iTerm2
Installation Method
Homebrew
Helix Version
helix 25.07.1 (a05c151)
Beta Was this translation helpful? Give feedback.
All reactions