Languages with automatic semicolon insertion such as JavaScript and Go have as bunch of edge-cases where they do unexpected things, and any C solution will probably be no different. In C macros in particular make it extra hard:
#define IF if(
#define THEN ){
#define ELSE } else {
#define ELIF } else if (
#define FI ;}
IF foo THEN
stmt();
FI
This is a bit of a silly thing to do, but people do use macros like that. I've seen "macro abuse" like this in more modern/current codebases too.
Merely inserting a semi-colon after a )\n
won't really work either:
int value = (cond == 5)
? (this_value)
: (other_value);
if (foo)
{
}
if (foo) bar(); // Do need it here!
So you really need deep knowledge of the C code, and as mentioned, even with that it's pretty tricky to get right. There's an open feature request for clangd language server.
For CSS it might be a little bit more doable as the syntax is simpler, but I wouldn't be surprised if there are edge cases there too.
My advice: just type the semicolons.
A ; Esc
... and repeat this at another line with.
.