Skip to content

Commit b8752a0

Browse files
authored
Fix completion of hyphenated items (#12035)
VSCode will dismiss and re-invoke completion and when a trigger character is typed. That's completely different from how VS client handles trigger characters. Removing hyphen from trigger characters fixes this behavior and allowed proper filtering and completoin of such items.
1 parent 2b049e1 commit b8752a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Completion/CompletionTriggerAndCommitCharacters.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ internal class CompletionTriggerAndCommitCharacters
1515
private const char TransitionCharacter = '@';
1616

1717
private static readonly char[] s_vsHtmlTriggerCharacters = [':', '#', '.', '!', '*', ',', '(', '[', '-', '<', '&', '\\', '/', '\'', '"', '=', ':', ' ', '`'];
18-
private static readonly char[] s_vsCodeHtmlTriggerCharacters = ['#', '.', '!', ',', '-', '<'];
18+
private static readonly char[] s_vsCodeHtmlTriggerCharacters = ['#', '.', '!', ',', '<'];
1919
private static readonly char[] s_razorTriggerCharacters = ['<', ':', ' '];
2020
private static readonly char[] s_csharpTriggerCharacters = [' ', '(', '=', '#', '.', '<', '[', '{', '"', '/', ':', '~'];
2121
private static readonly ImmutableArray<string> s_commitCharacters = [" ", ">", ";", "="];

0 commit comments

Comments
 (0)