Jintin/Swimat

[ARCHIVED] An Xcode formatter plug-in for Swift. Superseded by swift-format, now built into Xcode.

Swift

1,629

437 commits

updated Aug 3, 2026

See the code

README

Swimat

⚠️ This project is archived and no longer maintained.

Swimat was built in 2015, when Xcode had no built-in way to format Swift code. That is no longer true — Xcode now ships Apple's swift-format as a first-party feature, available under Editor → Structure → Format File.

If you're looking for a replacement:

NeedUse
Format inside XcodeEditor → Structure → Format File (built in)
A configurable Xcode extensionSwiftFormat for Xcode — brew install --cask swiftformat-for-xcode
Formatting in CI / pre-commitSwiftFormat or swift-format
LintingSwiftLint

The last release (1.7.0) no longer passes Gatekeeper and the Homebrew cask is being disabled. Please migrate to one of the options above.

Swimat's formatter is a hand-written character scanner, which cannot correctly handle Swift features added since ~2020 — regex literals, custom operators, and nested block comments can be corrupted. The tools above are built on swift-syntax and do not have this class of bug.

Thank you to the 1,600+ people who starred this, the 90+ who forked it, and everyone who filed an issue or sent a patch over the past decade. — @Jintin

Awesome github

Swimat is an Xcode plug-in to format your Swift code.

Preview

Installation

No longer available. The Homebrew cask has been deprecated and disabled, and the last released binary (1.7.0) does not pass Gatekeeper on current macOS. Please use one of the alternatives listed above instead.

The source remains here under the MIT license if you want to read it or build it yourself.

Usage

After installation, you should open the Swimat.app once to make the functionality works.

In the Xcode menu click [Editor] -> [Swimat] -> [Format] then the current active file will reformat.

You can also create a hot-key in [Xcode] -> [Preferences..] -> [Key Bindings], if you don't have any prefernce you can set as ⌘ + ⇧ + L.

TroubleShooting

Check [System Preferences] -> [Extensions] -> [Xcode Source Editor] -> [Swimat] is checked.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Jintin/Swimat.

License

The module is available as open source under the terms of the MIT License.

formatter
swift
swimat
xcode
xcode-extension
xcode-plugin

Jintin/Swimat

[ARCHIVED] An Xcode formatter plug-in for Swift. Superseded by swift-format, now built into Xcode.

Swift

1,629

437 commits

updated Aug 3, 2026

See the code

README

Swimat

⚠️ This project is archived and no longer maintained.

Swimat was built in 2015, when Xcode had no built-in way to format Swift code. That is no longer true — Xcode now ships Apple's swift-format as a first-party feature, available under Editor → Structure → Format File.

If you're looking for a replacement:

NeedUse
Format inside XcodeEditor → Structure → Format File (built in)
A configurable Xcode extensionSwiftFormat for Xcode — brew install --cask swiftformat-for-xcode
Formatting in CI / pre-commitSwiftFormat or swift-format
LintingSwiftLint

The last release (1.7.0) no longer passes Gatekeeper and the Homebrew cask is being disabled. Please migrate to one of the options above.

Swimat's formatter is a hand-written character scanner, which cannot correctly handle Swift features added since ~2020 — regex literals, custom operators, and nested block comments can be corrupted. The tools above are built on swift-syntax and do not have this class of bug.

Thank you to the 1,600+ people who starred this, the 90+ who forked it, and everyone who filed an issue or sent a patch over the past decade. — @Jintin

Awesome github

Swimat is an Xcode plug-in to format your Swift code.

Preview

Installation

No longer available. The Homebrew cask has been deprecated and disabled, and the last released binary (1.7.0) does not pass Gatekeeper on current macOS. Please use one of the alternatives listed above instead.

The source remains here under the MIT license if you want to read it or build it yourself.

Usage

After installation, you should open the Swimat.app once to make the functionality works.

In the Xcode menu click [Editor] -> [Swimat] -> [Format] then the current active file will reformat.

You can also create a hot-key in [Xcode] -> [Preferences..] -> [Key Bindings], if you don't have any prefernce you can set as ⌘ + ⇧ + L.

TroubleShooting

Check [System Preferences] -> [Extensions] -> [Xcode Source Editor] -> [Swimat] is checked.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Jintin/Swimat.

License

The module is available as open source under the terms of the MIT License.

formatter
swift
swimat
xcode
xcode-extension
xcode-plugin

Project health

Overall

2.3/10

Maintained

0/10

Code review

2/10
OpenSSF Scorecard

Significant stargazers

Franz Busch

260 followers · starred Apr 2016

Andrew Lisowski

434 followers · starred Jul 2020

rauno

5,275 followers · starred Nov 2021

Romain Menke

151 followers · starred Mar 2016