-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Semantic Snippets - don't show in razor documents #64377
Conversation
@@ -157,7 +157,7 @@ SyntaxKind.EndRegionKeyword or | |||
return ImmutableArray<CompletionItem>.Empty; | |||
|
|||
var snippets = service.GetSnippetsIfAvailable(); | |||
if (context.CompletionOptions.ShouldShowNewSnippetExperience()) | |||
if (context.CompletionOptions.ShouldShowNewSnippetExperience() && !context.Document.IsRazorDocument()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be rolled into ShouldShowNewSnippetExperience?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe we have access to the document at that point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you pass in the Document
as an argument to ShouldShowNewSnippetExperience
?
src/Features/CSharp/Portable/Completion/CompletionProviders/SnippetCompletionProvider.cs
Show resolved
Hide resolved
Needs to merge into |
Yup, yup! |
@@ -157,7 +157,7 @@ SyntaxKind.EndRegionKeyword or | |||
return ImmutableArray<CompletionItem>.Empty; | |||
|
|||
var snippets = service.GetSnippetsIfAvailable(); | |||
if (context.CompletionOptions.ShouldShowNewSnippetExperience()) | |||
if (context.CompletionOptions.ShouldShowNewSnippetExperience() && !context.Document.IsRazorDocument()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment explaining why this is desirable? Why don't we want semantic snippets in razor docs? |
dotnet/razor#6927 |
closed with #64378 |
Reverts back to the original behavior