mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
3643 Intellisense fix for spaces (#1073)
* 3643 Enhanced GetAutoCompleteSuggestions to escape spaces in the insertText when generating list of suggestions. Changed detail to include kind. * 3643 Fixed formatting * 3643 Changed variable in GetAutoCompleteSuggestions
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user