-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
[json] add commas automatically #69545
[json] add commas automatically #69545
Comments
It would be useful if could add an automatic comma when you hit the enter key after a line (as Android Studio does) |
Really should be implemented. |
You can try Auto Insert Comma . |
You can try Auto Insert Comma . |
You can try Auto Insert Comma . |
The extension is nice, but wish we had this built-in in VSCode |
@peteruithoven , yes that is in-scope for this issue. I do not support the behavior of Auto Insert Comma as a default for VS Code. That extension is adding commas greedily. It is possible for that extension to add a comma that you may not want and which you would have to delete. This proposal is for a default behavior where generally it is nice to err on the side of being correct rather than helpful. And that means adding a comma when it is 100% sure that is desired, including the top post and #69545 (comment). |
I do not recommend it. It doesn't work with However, @fulldecent I'm really interested in your feedback:
Do you mean that comma shouldn't be inserted after Also as I read from issue body, autocomplete should have |
Got it @zardoy, I have updated the expected behavior above and added another behavior that doesn't require auto complete |
Test case
Expected behavior
age
TAB, the comma should be added to the end of the previous line."
for the next object property, the comma should be added to the end of the previous line.Actual behavior
The autocomplete does not produce valid text.
Discussion
In general, the autocomplete should strive to produce output that is maximally valid in whatever language grammar it is using.
The text was updated successfully, but these errors were encountered: