-
Notifications
You must be signed in to change notification settings - Fork 408
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
completion request should include textEdit according to protocol #465
Comments
Log of an example:
|
|
We used to generate the textedits during the
For now, I think we could try to return a much smaller resultset instead (eg. max 10), with the |
TextEdits need to be computed during the completion call, but this can be extremely slow when a large number of results is returned. This PR tries to mitigate the issue by returning a partial result list and marking the results as incomplete. Smaller payload means computing Textedits is now more affordable. Hopefully the UX should be improved as well since completion queries will return faster too. The number of completion results is configurable with the java.completion.maxResults preference (defaults to 50). Setting 0 will disable the limit and return all results. Be aware the performance will be very negatively impacted as textEdits for all results will be computed eagerly (can be thousands of results). Fixes eclipse-jdtls#465 Signed-off-by: Fred Bricon <[email protected]>
TextEdits need to be computed during the completion call, but this can be extremely slow when a large number of results is returned. This change tries to mitigate the issue by returning a partial result list and marking the results as incomplete. Smaller payload means computing Textedits is now more affordable. Hopefully the UX should be improved as well since completion queries will return faster too. The number of completion results is configurable with the java.completion.maxResults preference (defaults to 50). Setting 0 will disable the limit and return all results. Be aware the performance will be very negatively impacted as textEdits for all results will be computed eagerly (can be thousands of results). Fixes eclipse-jdtls#465 Signed-off-by: Fred Bricon <[email protected]>
TextEdits need to be computed during the completion call, but this can be extremely slow when a large number of results is returned. This change tries to mitigate the issue by returning a partial result list and marking the results as incomplete. Smaller payload means computing Textedits is now more affordable. Hopefully the UX should be improved as well since completion queries will return faster too. The number of completion results is configurable with the java.completion.maxResults preference (defaults to 50). Setting 0 will disable the limit and return all results. Be aware the performance will be very negatively impacted as textEdits for all results will be computed eagerly (can be thousands of results). Fixes #465 Signed-off-by: Fred Bricon <[email protected]>
The current version of the protocol contains the following text:
However jdt.ls returns only
insertText
in the original response, but then adds atextEdit
after a resolve. This is a strict violation of the protocol and in editors that can't handle the resolve request properly, requires either that we resolve every completion item (the use of textEdit is not optional, insertion text alone doesn't work for things like imports).Is it possible to include the
textEdit
in the initial response?The text was updated successfully, but these errors were encountered: