Actually, a formatting tool would only need a D parser to get hold of the AST, so a LDC-specific thingy is not realistic (LDC translates the D AST provided by the official front-end to LLVM IR). You may want to have a look at dfmt (https://github.com/Hackerpilot/dfmt).