-
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
Don't set completion text to full signature unless its override or partial method completion #868
Don't set completion text to full signature unless its override or partial method completion #868
Conversation
…rtial method completion
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.
Nit on nameof otherwise looks good.
Should we consider adding a test for this case to avoid this in the future, perhaps as a second PR?
@@ -13,24 +12,36 @@ namespace OmniSharp.Roslyn.CSharp.Services.Intellisense | |||
{ | |||
internal static class CompletionItemExtensions | |||
{ | |||
private const string GetSymbolsAsync = "GetSymbolsAsync"; |
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.
Use named?
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.
thanks!
private const string Provider = "Provider"; | ||
private const string SymbolCompletionItem = "Microsoft.CodeAnalysis.Completion.Providers.SymbolCompletionItem"; | ||
private const string SymbolCompletionProvider = "Microsoft.CodeAnalysis.CSharp.Completion.Providers.SymbolCompletionProvider"; | ||
private const string SymbolKind = "SymbolKind"; |
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.
Use nameof?
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.
thanks!
Note: This isn't quite right. Some tests failing. |
aaaaah mystery solved! I never saw this on the original PR because I tested against the version of C# for VS Code which had the magic completion Regex still present (which we remved here dotnet/vscode-csharp@01aa52e). Turns out the purpose of this was to collapse overloads together on the client side. It absolutely makes sense to do this on the server side correctly instead - thanks @DustinCampbell for fixing 😅 |
This change fixes a regression where overloads would not be collapsed in the VS Code completion list. In addition, I added a couple of tweaks to ensure that we report the "EnumMember" and "Const" kinds.