Skip to content

Commit

Permalink
Added Directive [SPACE] Commit Character
Browse files Browse the repository at this point in the history
  • Loading branch information
TanayParikh committed Jun 16, 2020
1 parent 487ea95 commit f98d78d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ internal bool TryConvert(RazorCompletionItem razorCompletionItem, out Completion
SortText = razorCompletionItem.DisplayText,
Documentation = descriptionInfo.Description,
Kind = CompletionItemKind.Struct,
CommitCharacters = new Container<string>(razorCompletionItem.CommitCharacters),
};

if (razorCompletionItem == DirectiveAttributeTransitionCompletionItemProvider.TransitionCompletionItem)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ internal static List<RazorCompletionItem> GetDirectiveCompletionItems(RazorSynta
var completionItem = new RazorCompletionItem(
completionDisplayText,
directive.Directive,
RazorCompletionItemKind.Directive);
RazorCompletionItemKind.Directive,
new string[] { " " });
var completionDescription = new DirectiveCompletionDescription(directive.Description);
completionItem.SetDirectiveCompletionDescription(completionDescription);
completionItems.Add(completionItem);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ private static void AssertRazorCompletionItem(string completionDisplayText, Dire
Assert.Equal(item.InsertText, directive.Directive);
var completionDescription = item.GetDirectiveCompletionDescription();
Assert.Equal(directive.Description, completionDescription.Description);
Assert.Single(item.CommitCharacters, " ");
}

private static void AssertRazorCompletionItem(DirectiveDescriptor directive, RazorCompletionItem item) =>
Expand Down

0 comments on commit f98d78d

Please sign in to comment.