tonycoco / PrettySwift

Xcode Source Editor Extension that formats and lints your Swift code. It uses swift-format to format or lint and takes a zero-configuration approach.
Apache License 2.0
6 stars 0 forks source link
format lint macos xcode xcode-extension

PrettySwift for Xcode

PrettySwift is a Xcode Source Editor Extension that formats and lints your Swift code. It uses swift-format to format or lint and takes a zero-configuration approach.

Installation

To install PrettySwift for Xcode, download it from the Mac App Store. Then, open the app and follow the instructions.

Download on the Mac App Store

Usage

Format

To format your code, open a Swift file you want to format and choose Editor > PrettySwift > Format from the menu bar.

Lint

To lint your code, open a Swift file you want to lint and choose Editor > PrettySwift > Lint from the menu bar.

Integration

If you want to use a keyboard shortcut to format your code, you can add one in System Settings > Keyboard > Keyboard Shortcuts > App Shortcuts. Click the + button, choose Xcode as the application, type Editor->PrettySwift->Format as the menu title, and then choose a keyboard shortcut like ⌘S.