-
Notifications
You must be signed in to change notification settings - Fork 65
Description
PR #906 introduced a pseudo completion item, which is added when a completion list is marked as incomplete.
We recently discovered a bug (#1448, Platform.UI ) , whose impact is massively worsened by this behavior, so I'd like to make a few points against adding this pseudo entry:
- I don't think that the information encoded in
CompletionList.isIncompleteis intended to be shown to the end-user. The spec says:
for speed clients should be able to filter an already received completion list if the user continues typing. Servers can opt out of this using a CompletionList and mark it as isIncomplete.
So the flag is only intended to tell the client (not the user) that it cannot re-use and filter the received completion list if the user types more characters, but has to ask the server again for a fresh completion list.
-
If you are working with a LS which is setting this flag, e.g., basedpyright, then you get this annoying behavior on every typed character:
https://github.com/user-attachments/assets/26799104-597f-4a00-976f-8268dbfe2208
This is also making the bug in Flickering hover popup on mouse-over #1448 incrementally worse. -
Other LS Clients, e.g., Theia or VS Code do not behave this way, i.e., they just don't open a completions popup at all if the returned proposal list is empty:
https://github.com/user-attachments/assets/a6a40b9a-3ca8-4b8e-a1fe-05fcd2116f33
@andrewL-avlq, since you added the behavior in the first place, do you still recall your use-case?
Since I don't want to break the workflow of other LSP4E users, here are a few ideas to make this less of a problem:
Ordered from least to most invasive.
- Add a preference to configure if the pseudo proposal should be added
- Only add the pseudo-proposal if the list is not empty.
- Don't add the pseudo proposal at all (basically revert Indicate when content assist proposals are incomplete. #906) , to make LSP4E follow the Spec more closely and behave similar to other LSP Clients (My preferred solution, but likely not feasible and breaking the use-case of @andrewL-avlq)
Thoughts?