From 11ed5d648abb224c544cdeee10ec434ac30afb1f Mon Sep 17 00:00:00 2001 From: Marco Goertz Date: Fri, 26 Mar 2021 07:32:30 -0700 Subject: [PATCH] Update XAML completion kind mapping to new 16.10 CompletionItemKinds. --- .../Handler/Completion/CompletionHandler.cs | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/VisualStudio/Xaml/Impl/Implementation/LanguageServer/Handler/Completion/CompletionHandler.cs b/src/VisualStudio/Xaml/Impl/Implementation/LanguageServer/Handler/Completion/CompletionHandler.cs index 58b1e7989af6a..e0335dbc7c163 100644 --- a/src/VisualStudio/Xaml/Impl/Implementation/LanguageServer/Handler/Completion/CompletionHandler.cs +++ b/src/VisualStudio/Xaml/Impl/Implementation/LanguageServer/Handler/Completion/CompletionHandler.cs @@ -109,43 +109,42 @@ private static CompletionItemKind GetItemKind(XamlCompletionKind kind) { case XamlCompletionKind.Element: case XamlCompletionKind.ElementName: + return CompletionItemKind.Element; case XamlCompletionKind.EndTag: - return CompletionItemKind.Class; + return CompletionItemKind.CloseElement; case XamlCompletionKind.Attribute: case XamlCompletionKind.AttachedPropertyValue: - case XamlCompletionKind.PropertyElement: - case XamlCompletionKind.MarkupExtensionParameter: case XamlCompletionKind.ConditionalArgument: + case XamlCompletionKind.DataBoundProperty: + case XamlCompletionKind.MarkupExtensionParameter: + case XamlCompletionKind.PropertyElement: return CompletionItemKind.Property; + case XamlCompletionKind.ConditionValue: case XamlCompletionKind.MarkupExtensionValue: case XamlCompletionKind.PropertyValue: - case XamlCompletionKind.NamespaceValue: - case XamlCompletionKind.ConditionValue: case XamlCompletionKind.Value: return CompletionItemKind.Value; case XamlCompletionKind.Event: case XamlCompletionKind.EventHandlerDescription: return CompletionItemKind.Event; - case XamlCompletionKind.MarkupExtensionClass: - return CompletionItemKind.Method; + case XamlCompletionKind.NamespaceValue: case XamlCompletionKind.Prefix: - return CompletionItemKind.Constant; + return CompletionItemKind.Namespace; + case XamlCompletionKind.AttachedPropertyTypePrefix: + case XamlCompletionKind.MarkupExtensionClass: case XamlCompletionKind.Type: case XamlCompletionKind.TypePrefix: - case XamlCompletionKind.AttachedPropertyTypePrefix: - return CompletionItemKind.TypeParameter; + return CompletionItemKind.Class; case XamlCompletionKind.LocalResource: - return CompletionItemKind.Reference; + return CompletionItemKind.LocalResource; case XamlCompletionKind.SystemResource: - return CompletionItemKind.Reference; + return CompletionItemKind.SystemResource; case XamlCompletionKind.CData: case XamlCompletionKind.Comment: case XamlCompletionKind.ProcessingInstruction: case XamlCompletionKind.RegionStart: case XamlCompletionKind.RegionEnd: return CompletionItemKind.Keyword; - case XamlCompletionKind.DataBoundProperty: - return CompletionItemKind.Variable; case XamlCompletionKind.Snippet: return CompletionItemKind.Snippet; default: