Skip to content
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

Use new Roslyn Completion List API for IntelliSense #78

Closed
nosami opened this issue Feb 13, 2015 · 24 comments · Fixed by #1877
Closed

Use new Roslyn Completion List API for IntelliSense #78

nosami opened this issue Feb 13, 2015 · 24 comments · Fixed by #1877
Assignees

Comments

@nosami
Copy link
Contributor

nosami commented Feb 13, 2015

Internal, but much better. Handles keywords, snippets, named parameters, object initializer etc.

https://github.com/dotnet/roslyn/blob/47ff630cc838b56248022c1d494299f35daec474/src/Features/CSharp/Completion/CSharpCompletionService.cs

var completionService = new CSharpCompletionService();
var t = await completionService.GetGroupsAsync(document, position, new mca.Completion.CompletionTriggerInfo(), completionService.GetDefaultCompletionProviders(), new CancellationToken());
@davidfowl
Copy link
Member

epic

@jrieken
Copy link
Contributor

jrieken commented Feb 13, 2015

👍 reflection ftw

@stirno
Copy link

stirno commented Feb 16, 2015

I have a working impl of this in our codebase but it throws under Mono presently with a not-very-helpful error. Haven't had a chance to dig through that yet.

Also theres an internal extension method on document to help create the service, might be better to use that in case it gets more MEFy:

var completionService = document.GetLanguageService<ICompletionService>();

@Pilchie
Copy link
Contributor

Pilchie commented Feb 17, 2015

Nice! I would like to make something like that public at some point after I make something like ICompletionProvider public (my current side project).

@nosami
Copy link
Contributor Author

nosami commented Feb 20, 2015

Seems that the features assembly doesn't yet have a nuget package - dotnet/roslyn#572

@aelij
Copy link

aelij commented May 15, 2015

@Pilchie, while you're doing that, how about moving ISignatureHelpProvider to the Features assembly and making it public as well? :)
It has no dependency on the VS SDK, so it should be easy (I know because I've done it).

@nosami I think OmniSharp would also benefit from this. The signature help provider is much better at providing both method and argument IntelliSense than the Recommender.

@Pilchie
Copy link
Contributor

Pilchie commented May 15, 2015

Tagging @DustinCampbell on this too.

@DustinCampbell
Copy link
Contributor

I'm going to tracking this over at dotnet/roslyn#3538

@DustinCampbell
Copy link
Contributor

And here: dotnet/roslyn#3540

@khellang
Copy link

👍

@DustinCampbell
Copy link
Contributor

And if anyone's interested, the branch I'm working out of is at https://github.com/DustinCampbell/roslyn/tree/completion-api.

@tpetrina
Copy link

Hi @DustinCampbell, can you please give an example on how to use the completion API in your branch?

@DustinCampbell
Copy link
Contributor

Patience. 😄 I'm actively integrating it back into Roslyn proper as an internal API. Once that happens, I'll run it through a formal API design process and we'll make it public.

@tpetrina
Copy link

OK, thanks. I was under the impression that you are nearly done :P

@DustinCampbell
Copy link
Contributor

Getting pretty close (for example: dotnet/roslyn#3955). I've been on vacation the past several weeks so work halted for a bit. I'm moving much faster now.

@Vidhyakp
Copy link

Vidhyakp commented Jan 8, 2016

I need a script editor that provides intellisense and squiggling.

With Recommender I am not able to get the "keywords" which was possible ICompletionService which was public in earlier versions of Roslyn.

Can you please let me know whether we have any thing similar to ICompletionService that is public in the latest version or any update on making "ICompletionService" public?

@DustinCampbell
Copy link
Contributor

This was implemented in Roslyn with #8170. A public completion API is now available. I'll own integrating it in OmniSharp.

@DustinCampbell DustinCampbell changed the title Use CSharpCompletionService instead of Recommender for intellisense Use new Roslyn Completion List API for IntelliSense May 11, 2016
@ivanz
Copy link
Member

ivanz commented Aug 23, 2016

What is the status of this? I see that a pull requests #583 was merged in June which seems to implement the new completion API, but when I compile the dev branch and point my VSCode workspace to it - I see no change in auto-completion of object initializers and constructors - still no show? (dotnet/vscode-csharp#260 ) Isn't the new completion API supposed to resolve this?

    "csharp.omnisharp" : "C:/code/omnisharp-roslyn/artifacts/publish/OmniSharp/default/netcoreapp1.0/OmniSharp.exe"

@DustinCampbell
Copy link
Contributor

#583 uses the new completion API with the same OmniSharp end point. Currently, it only uses the completion API to retrieve the available keywords (which allowed me to remove a ton of code from OmniSharp). I've been looking at this and believe that a new v2 end point will be needed to properly target the completion API.

@Novack
Copy link

Novack commented Nov 21, 2016

Following.

@Novack
Copy link

Novack commented Apr 17, 2017

Any progress or changes?

@kzu
Copy link
Contributor

kzu commented Nov 9, 2018

@DustinCampbell so now there's even a v3 of the protocol https://microsoft.github.io/language-server-protocol/specification :). I'd love to see this happening...

@DustinCampbell
Copy link
Contributor

@kzu -- what, specifically, would you like to see? The work tracked here isn't related to LSP.

@kzu
Copy link
Contributor

kzu commented Nov 16, 2018

Would like to see the full completion, and ideally even with some way to configure additional completion providers exported somehow to OmniSharp :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet