I wouldn’t worry about formatting too much at this point. Formatting is a non-trivial problem to solve and I would suggest running a formatter like swift-format on the code generated by SwiftSyntaxBuilder but that would be a follow-up step after generating the actual code.
The code is an accessor and not an initializer because every time you access the enum variable, the code in the braces gets executed to generate TokenSyntax representing the enum keyword. You can see this behavior if you e.g. put a print statement in the accessor. An initializer would be static var `enum`: TokenSyntax = SyntaxFactory.makeEnumKeyword().withTrailingTrivia(.spaces(1))
I agree that the syntax to generate variables is a little verbose at the moment. IMHO adding convenience initializers like the one you added in Tokens.gen.swift is the way forward here.