-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Extend completion to support language servers which requires an additional "completion item resolve" request #1313
Comments
I'm pretty new to many things here (Helix, Rust, LSP 😄) but I'm willing (and eager) to help with that. I looked at how the current implementation works, and right here it applies the "additional edits" on the document. I'm not sure if that's fine to make the completionItem/resolve request to the language server there, as this file appears to be concerned only with UI logic. |
I think this would actually happen in the But rather wait for someone experienced. Also, this overlaps with: #183 Footnotes |
Hi @matoous , I'm not sure if I understood your idea. I agree that the "codeAction/resolve" could be done right where you pointed out. But to solve the problem that I mentioned, the right request to do is the "completionItem/resolve", as said in the docs. And it looks like its not possible to do that at About the solution, "archseer" gave me some direction on the Matrix community about how to do that using "block_on", I will try it and see if that works. |
🙈 yes, I just mis-read. You are absolutely right. |
There are some language servers that does not include a "textEdit" nor a "additionalTextEdits" on the response of the "textDocument/completion" request, and because of that, some features like auto importing an unqualified type does not work.
An example of that is the TypeScript language server.
Reading the LSP documentation, the way of doing that is issuing a "completion item resolve" request with the "completion item" selected by the user.
If that helps, the TypeScript language server replies the "documentText/completion" with (simplified, extracted from the logs):
The text was updated successfully, but these errors were encountered: