You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Other extensions you installed (and if the issue persists after disabling them): none
So the suggestion is to auto place semicolon after class, struct, enum and union definition. Since we have already autocompletion for the brackets, when struct A {| completes to struct A{ | } why not to put a semicolon after brackets to complete class, struct etc. definition like struct A{ | };. It really bugs me to put semicolon every time at the end of definition.
To Reproduce
Type struct A {|
Auto complete will do its job: struct A{ | }
Observe error squiggles - missing semicolon after struct definition!
Put semicolon by hand
Expected behavior
Autocomplete with semicolon at the end of class, struct, enum and union definition.
We have struct/class/etc. snippets that do this. Have you tried that or is the snippet behavior not desirable? VS Code itself auto-completes the }, but there is no way for us to change that behavior and add a ";" at the end.
Activity
sean-mcmanus commentedon Jan 25, 2019
We have struct/class/etc. snippets that do this. Have you tried that or is the snippet behavior not desirable? VS Code itself auto-completes the }, but there is no way for us to change that behavior and add a ";" at the end.
sean-mcmanus commentedon Jan 25, 2019
I've filed a feature request with Visual Studio Code at microsoft/vscode#67090 (you could upvote that).
oktonion commentedon Jan 25, 2019
Oh, thank you. It is confusing sometimes to distinguish the job of extension and the editor itself.
xgdgsc commentedon Feb 22, 2022
Is it possible to auto add semicolon after
breakandcontinue?sean-mcmanus commentedon Feb 24, 2022
xgdgsc You mean as part of the keyword completion? I think that's the only place it could be added. i.e.

I've filed an issue at #8932 .
imtangsheng commentedon Jun 25, 2022
I solved the problem here
https://code.visualstudio.com/docs/getstarted/keybindings
sean-mcmanus commentedon Mar 7, 2023
The VS Code team closed it due to not enough upvotes: microsoft/vscode#67090
ModyxOstora commentedon Aug 20, 2026
I tried to solve this problem by making an extension called C++ Class/Struct Auto Semicolon & Bracket, I published it in vs code so give it a try🙂