Hi Pete,
Welcome to the MSDN forum.
Refer to your description, your issue is about the VS Code and our forum is to discuss the VS IDE.
Do you want to create a formatter extension for VS code? Please check this doc:
Creating a Formatter Extension
and the Visual Studio Code extension API has provided support for source code formatters. For a more professional support, you can click the Ask questions or Follow @code at the right side of this page as below, thank you for your understanding.

Best regards,
Sara
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any
compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com