You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Not working -> auto imports, completion, documentation on linux #20
I see that this problem is not there in zed for C++ with clang, everything above is working as expected.
Observation from LSP logs:
I see that eclipse.jdtls lsp didn't return additionalTextEdits, documentation, editText on completionItem/resolve request.
From Zed source code I see
These properties are marked for lazy evaluation and hence must be resolved lazily with completionItem/resolve request instead of textDocument/completion. Which didn't happen, (They are present in neither of those responses).
On changing commenting out the additionalTextEdits line (marking it not for lazy resolve), I managed to get additionalTextEdits in both completionItem/resolve and textDocument/completion, which made auto import work.
But I am not able to make any progress on documentation. (because documentation is by default lazy evaluated?!)
for textEditTexts they seem to be provided in textDocument/completion but not in completionItem/resolve.
I am not sure is this an issue with JDTLS or Zed. Knowing that many editors using JDTLS work fine, I suspect the issue has to be from Zed side.
Thanks very much for looking into this! I am aware that JDTLS doesn't exactly use normal LSP, it uses its own extension of it, so I think you could blame JDTLS for weirdness. However, it's unlikely they would consider this a bug and change the behavior. The VSCode extension, for example, works because it implements LSP and the JDTLS extension of LSP completely from the ground up, specifically tailored to JDTLS. Zed, meanwhile, uses standard LSP, and is not implemented per extension. Zed may allow its extensions to implement LSP extensions in the future I think, but it doesn't right now, so probably the only way to fix these issues soon would be to handle JDTLS specifically in Zed itself (kinda like how Rust isn't an extension, it's handled by Zed itself). I'm not sure if the Zed maintainers would want to do that, but you could open an issue and pitch the idea if you'd like!
Hey, is this really the issue? the link you provided to the lsp extensions of jdtls has only two entries for "request from client to server". (
The other two are just notification from server to client, not related to this ig.)
I ran vs code java extenstion in verbose mode using "java.trace.server": "verbose" setting and I can say that none of these two lsp extensions were used.
Maybe it's not, sorry, I just reread your issue
I think I misremembered what the details of your issue actually was earlier ^^'
In case you haven't yet, I think you should probably make an issue for Zed based on my understanding right now
Also, since you have a better understanding of this issue than I do, feel free to rename this issue, sorry again ^^'
Activity
valentinegb commentedon Nov 11, 2024
Thanks very much for looking into this! I am aware that JDTLS doesn't exactly use normal LSP, it uses its own extension of it, so I think you could blame JDTLS for weirdness. However, it's unlikely they would consider this a bug and change the behavior. The VSCode extension, for example, works because it implements LSP and the JDTLS extension of LSP completely from the ground up, specifically tailored to JDTLS. Zed, meanwhile, uses standard LSP, and is not implemented per extension. Zed may allow its extensions to implement LSP extensions in the future I think, but it doesn't right now, so probably the only way to fix these issues soon would be to handle JDTLS specifically in Zed itself (kinda like how Rust isn't an extension, it's handled by Zed itself). I'm not sure if the Zed maintainers would want to do that, but you could open an issue and pitch the idea if you'd like!
[-]Not working -> auto imports, completion, documentation on linux[/-][+]Support JDTLS LSP extensions[/+]valentinegb commentedon Nov 24, 2024
I opened an issue related to this for Zed, you should watch it: zed-industries/zed#21133SaiKamalP commentedon Nov 24, 2024
Hey, is this really the issue? the link you provided to the lsp extensions of jdtls has only two entries for "request from client to server". (
The other two are just notification from server to client, not related to this ig.)
I ran vs code java extenstion in verbose mode using
"java.trace.server": "verbose"setting and I can say that none of these two lsp extensions were used.So I am wondering if this is really the problem.
valentinegb commentedon Nov 24, 2024
Maybe it's not, sorry, I just reread your issue
I think I misremembered what the details of your issue actually was earlier ^^'
In case you haven't yet, I think you should probably make an issue for Zed based on my understanding right now
Also, since you have a better understanding of this issue than I do, feel free to rename this issue, sorry again ^^'
[-]Support JDTLS LSP extensions[/-][+] Not working -> auto imports, completion, documentation on linux[/+]SaiKamalP commentedon Nov 25, 2024
Hey, I think, I found the culprit, watch out at zed-industries/zed#21185