Fast Swift FormatApple's Install from the Visual Studio Marketplace. Why I made thisI measured a 21-second toolchain discovery delay in the Swift VS Code extension. Meanwhile, launching Apple's standalone Formatting should not need to wait for the rest of the development environment. Fast Swift Format registers a native VS Code formatting provider and calls the formatter directly. Actual VS Code save requests measured 15–33 milliseconds, including process launch. These are local measurements on small files, not a guarantee for every file or machine. The exact cause of the original 21-second discovery delay remains unproven; this extension removes that dependency from formatting. The Swift extension can keep providing completion, diagnostics, debugging, and other language features. This extension handles formatting independently. Install and enable globallyInstall Fast Swift Format by mesqueeb from the VS Code Extensions view, or run:
Add this to your User
If you already have a Use Apple's formatterYou need Apple's
For the fastest startup, copy that result into User settings:
Use your actual path; your Xcode installation may have a different name. Update it when you change or remove that toolchain. The extension uses the configured executable directly and does not run With the setting empty, macOS discovers the formatter once per extension session using This is Apple's Your project's formatting rulesThe extension sends the current editor text through stdin and supplies the document's path with I verified actual VS Code saves against direct CLI output with a source-folder line length of 100 and a nested test-folder line length of 200. Both used the correct configuration. For an untitled document, configuration lookup starts in the sole workspace folder. With multiple workspace folders or no open folder, it starts in the operating system's temporary directory. Save the document into its project to give it an unambiguous configuration path. How it works
There is no formatter daemon or keep-warm service. A direct formatter process starts cheaply in my measurements; the expensive discovery steps are avoided. OS caches and machine load can still affect startup time. Run Fast Swift Format: Show Output to see request durations, including process launch. Develop locally
The extension has no runtime npm dependencies. Research and optional startup diagnostics are in Releases publish automatically when a new version is pushed to LicenseMIT. Created by Luca Ban / mesqueeb. |