Automatically formatting code in VS Code Install the Flutter extension (see Editor setup) to get automatic formatting of code in VS Code. To automatically format the code in the current source code window, right-click in the code window and select Format Document .