-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jdtls does not support includeDeclaration
in textDocument/references
?
#2148
Comments
includeDeclaration
in textDocument/references
includeDeclaration
in textDocument/references
?
I'm not sure that JDT-LS is meant to do anything in addition, though maybe I'm not understanding how the protocol works. According to https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#referenceContext ,
But according to the protocol, the response can only be
I'm not sure the protocol allows us to provide the declaration. Might this be something the client needs to request ? Update : I guess we could simply include the declaration as the location, but it seems strange to do that particularly when a declaration (eg. a method) has a large block. |
Hi, thanks for your reply.
If I understand the protocol correctly, I think what you said here is a server should do if With regard to declarations with large blocks, I think including the declaration as a location is no problem. IMO, references are often used to help people have an overview of where a symbol is used (and declared) and jump to one of them. For a method, jumping to the beginning of it makes sense. Some other LSP servers ( such as pyright and rust-analyzer ) will include the declaration as a location if |
Right. I was interpretting So for something like :
finding references of |
@JessicaJHee , this would be a nice first issue if interested. |
I'm interested in working on this issue! |
I tested this in Emacs with lsp-mode, and jtd.ls did not return the declaration. Can any confirm this please?
The text was updated successfully, but these errors were encountered: