Better handle attribute snippet completion in components#12281
Better handle attribute snippet completion in components#12281ToddGrun merged 3 commits intodotnet:mainfrom
Conversation
2) Break apart snippet context detection 3) Make local functions static
2) Add a couple statics for common IA collections
… to when creating a commit character for "=" 2) Have the AddCompletion method return a RazorCommitCharacter instead of a string, to indicate whether the commit should insert the commit character 3) Add a couple more statics that are commonly used. 4) Add test
|
@dotnet/razor-tooling ptal |
chsienki
left a comment
There was a problem hiding this comment.
LGTM, but may want to wait for @davidwengier to take a look too
davidwengier
left a comment
There was a problem hiding this comment.
It would be really good if you could do a quick test of this and #12271 in VS Code to make sure nothing regresses there. Feels like this area of completion keeps changing, and I wonder if we're accidentally yo-yo-ing between working in VS, and VS Code, and fixing for one breaks the other. Or we just have lots of little bugs. I'd believe either one tbh
OK, I've verified in a vscode with these changes:
|
|
Awesome, thank you <3
Yeah, |
Better handle attribute snippet completion in components
This addresses a scenario where completion commit would insert an extra '=' inside the attribute value. For example, committing "@ref" via typing '=' in this code
below would end up with the following document contents:
Fixes: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2581843