-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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] CompletionList#isIncomplete ignored on empty or fully filtered items #13735
Comments
An empty result is considered no result and doesn't even make it into the view model - so, yes that is that is on purpose. Incomplete but not empty lists will trigger the ask-again-on-type-logic if the very first time the result-set wasn't filtered to empty. I think that is fair because completions should always match the current line value before the position. |
The problem is that if I use the isIncomplete mode, to return different results based on the offset and prefix and there is a position that returns nothing, I don't get retriggered in that same context anymore. E.g. I have a prefix of |
This iteration we focus on issue grooming. This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider. If you wonder what we are up to, please see our roadmap and issue reporting guidelines. Thanks for your understanding and happy coding! |
The snippets are matched by (case-insensitive) prefix Snippets are only shown if one of the following is true: - The first word of the prefix is >= 3 chars and 3 chars of the first word have been typed (foo matches foobar). - The first word of the prefix is < 3 chars and the entire first word has been typed (e.g. s3 matches s3). Caveat: VSCode requires at least 1 snippet to be shown in order for snippets to be shown after more text is typed. Therefore, if only 1 or 2 chars are typed that match (but don't complete) the first word of the prefix, 1 snippet will always be shown. See microsoft/vscode#13735
We need to return non-empty completion list for update the results microsoft/vscode#13735
When a CompletionList returns an empty array of items but has set
isIncomplete: true
, the content proposal provider is not asked again on further typing.I think it is because
https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/suggest/common/completionModel.ts#L167
is not reached if no item exists or all items are filtered.
Is this intentional?
It can be reproduced easily with monaco's playground:
https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-completion-provider-example
Paste the following snippet into it:
The text was updated successfully, but these errors were encountered: