diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/KustoDataSource.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/KustoDataSource.cs index 99b6b87e..ff6fea2c 100644 --- a/src/Microsoft.Kusto.ServiceLayer/DataSource/KustoDataSource.cs +++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/KustoDataSource.cs @@ -429,7 +429,11 @@ namespace Microsoft.Kusto.ServiceLayer.DataSource foreach (var autoCompleteItem in completion.Items) { var label = autoCompleteItem.DisplayText; - completions.Add(AutoCompleteHelper.CreateCompletionItem(label, label + " keyword", label, KustoIntellisenseHelper.CreateCompletionItemKind(autoCompleteItem.Kind), scriptDocumentInfo.StartLine, scriptDocumentInfo.StartColumn, textPosition.Character)); + var insertText = KustoQueryUtils.EscapeName(label); + var completionKind = KustoIntellisenseHelper.CreateCompletionItemKind(autoCompleteItem.Kind); + completions.Add(AutoCompleteHelper.CreateCompletionItem(label, autoCompleteItem.Kind.ToString(), + insertText, completionKind, scriptDocumentInfo.StartLine, scriptDocumentInfo.StartColumn, + textPosition.Character)); } return completions.ToArray();