Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Fix(52604): Provide Object member completions without comma; insert a comma #52899
Fix(52604): Provide Object member completions without comma; insert a comma #52899
Changes from 13 commits
7c72784
fa517aa
6613dca
4f88134
586a2e5
3ab385f
abb5c07
c8c1362
463a435
54456cc
87b09f8
2fff618
b33aef8
731222c
89d178b
790b30c
c477b17
7e861b6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
So, I've been thinking about the difference between
contextToken
andpreviousToken
andlocation
, and when to use each one, and I found another case that doesn't seem to be working:I have a feeling that we might want to be using
previousToken
instead ofcontextToken
, but I might be wrong.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.
Ah, this is not a new test case, it's the same as this one I previously commented:
The relevant factor seems to be that there is an identifier in the right side of the property assignment.
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.
IIRC,
The idea is in most places, the completions should be the same whether or not you’ve already started typing something at the current location, so
contextToken
usually provides a stable token between those two similar cases, wherepreviousToken
changes. But I could be oversimplifying that, and the typical logic of “just usecontextToken
” may not apply when checking to see if there’s a comma. But there should definitely be tests both where the beginning of the expected completion has already been typed and where nothing has been typed yet.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.
Added test cases to check when the beginning of the expected completion is typed.