Omnisharp-roslyn: Import completion for types

Created on 8 May 2019  路  10Comments  路  Source: OmniSharp/omnisharp-roslyn

Is there any possibility of supporting this in future?
https://github.com/dotnet/roslyn/pull/34808

It's still in preview and based on idea of IntelliSense Extender VS extension.
It will be out of preview in a few versions.

Roslyn itself is capable of providing unimported type information via TypeImportCompletionProvider implemented in above pull request. CompletionService should suffice and support this new CompletionProvider without any major changes. Maybe even without changes.

feature request

Most helpful comment

still work in progress 馃槃

All 10 comments

Yes it's in the plans.

I have built a prototype for this now and we'll have a look at integrating it soon. It will require some changes to the VS Code side of the extension too.

Roslyn itself is capable of providing unimported type information via TypeImportCompletionProvider implemented in above pull request. CompletionService should suffice and support this new CompletionProvider without any major changes. Maybe even without changes.

This is unfortunately not true. Each completion now needs to resolve additional set of changes for the document (to facilitate the "imported" namespaces"). This cannot be done for all completion items for performance reasons - only for the selected one. This means that the current simple completion request-response model has to be replaced with request-response-extra resolve request-extra resolve response model.

Additionally, while TypeImportCompletionProvider is there now, in order to wire it in, we need to activate it and that API is not public so it has to be done with reflection.

That said, like I mentioned I hope to get the prototype integrated here as soon as possible.

Once the prototype is built, a brief description of that request->response->extra process would be very much appreciated, so we can implement it in other clients (OmniSharp-vim)

still work in progress 馃槃

@filipw Can I help somehow? Is there a WIP branch?

Any progress so far? Must have feature!

+1 this would be amazing to have

Yes it's in the plans.

Any status?

image
image

No suggestions? how to fix that?
Using this ext https://github.com/natanfudge/Auto-Using

@filipw Is this still in the works? This is a much needed feature imho.

Was this page helpful?
0 / 5 - 0 ratings