Go to Definition' (gd) isn't working for Java's Standard Library using jdtls #14155
Unanswered
sjoerdschouten
asked this question in
Troubleshooting
Replies: 2 comments 1 reply
-
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.
1 reply
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/definition
request.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-app
Create or Update src/main/java/com/example/Main.java
First, remove
App.java
if it's present. Then, create or updatesrc/main/java/com/example/Main.java
with 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-app
directory to configure JDTLS and enable detailed logging for both JDTLS and Helix:Launch Helix and Test
From the
my-app
directory, 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/definition
request to JDTLS and navigate to thejava.util.List
source (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