-
Notifications
You must be signed in to change notification settings - Fork 420
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
Support completion of unimported types. #1896
Conversation
This needs to call a few internal overloads for completion, instead of the public versions, in order to determine whether any completions can be expanded (ie, imported) and to get the full change for these items, including the import. The public APIs do not provide this information currently.
src/OmniSharp.Abstractions/Models/v1/Completion/CompletionItem.cs
Outdated
Show resolved
Hide resolved
src/OmniSharp.Roslyn.CSharp/Services/Completion/CompletionService.cs
Outdated
Show resolved
Hide resolved
src/OmniSharp.Roslyn.CSharp/Services/Intellisense/CompletionItemExtensions.cs
Show resolved
Hide resolved
* Added global option for controlling whether import completion is turned on, off by default. * Additional testing.
it looks like the tests are a bit unstable for example this failed on Linux
but passed on a retry. Maybe some sort of a thread exhaustion, these agents are not too powerful |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll up the cancelation limit. 100 ms is very stable locally, but I was a bit curious how they'd do on CI. |
@filipw upped the timeout to a second/test. |
thanks this is good to go IMHO! 🍻 |
Thanks Fred! |
This needs to call a few internal overloads for completion, instead of the public versions, in order to determine whether any completions can be expanded (ie, imported) and to get the full change for these items, including the import. The public APIs do not provide this information currently.
Todo:
Preview of the change in vscode (watch the line numbers!):
Fixes #1482