Skip to content

Filter completion client-side even if the LSP returns incomplete results #168329

@danielhuang

Description

@danielhuang

Using rust-analyzer, the LSP server could return partial results for completions, where typing additional characters could cause more completions to show that were not visible in the first batch.

Currently, the completion popup looks like this:

Screencast.from.2022-11-06.16-07-04.mov

There would be a discrepancy between the user's expectations and the actual completions shown, since the filter operation is noticeably delayed.

If the completion results were not marked as incomplete, it would look like this:

Screencast.from.2022-11-06.16-11-05.mov

The client would filter the results directly.

Ideally, the client would filter the results directly even if the server returns an incomplete set, while showing a loading indicator. Then, once the server responds with the next batch of completions after server-side filtering is complete, the completion results would be updated with the final value. This would behave similar to IntelliJ's completion display.

Metadata

Metadata

Assignees

Labels

suggestIntelliSense, Auto Completeunder-discussionIssue is under discussion for relevance, priority, approach

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions