|
1 |
| -**SwiftFormat** provides integration with Nick Lockwood's [SwiftFormat](https://github.com/nicklockwood/SwiftFormat). The extension will run the formatter when you save a Swift document. It can alternatively be invoked as an editor command. |
| 1 | +**SwiftFormat** provides integration with Nick Lockwood's [SwiftFormat](https://github.com/nicklockwood/SwiftFormat) which is a tool for reformatting Swift code. |
2 | 2 |
|
3 |
| -<!-- |
4 |
| -🎈 It can also be helpful to include a screenshot or GIF showing your extension in action: |
5 |
| ---> |
| 3 | +This extension will run the formatter when a Swift document is saved. It can also be invoked as an editor command. |
6 | 4 |
|
7 |
| - |
| 5 | + |
8 | 6 |
|
9 | 7 | ## Requirements
|
10 | 8 |
|
11 |
| -SwiftFormat includes a built-in version of the formatter. If you would like to use a different version you can customize the extension with a path to your own version in settings. You might want to do this if you work on a team and want to ensure that everyone is using a particular version. |
| 9 | +The SwiftFormat extension includes a built-in version of the actual formatter tool, so no additional setup is required. |
| 10 | + |
| 11 | +If you would like to use a different version, you can set a path to a custom binary in settings. You might do this if you work on a team and want to ensure that everyone is using a particular version. |
12 | 12 |
|
13 | 13 | ## Usage
|
14 |
| -SwiftFormat runs any time you save a Swift document, automatically reformatting the Swift according to the default SwiftFormat [rules](https://github.com/nicklockwood/SwiftFormat#rules). You can customize these in a `.swiftformat` [config file](https://github.com/nicklockwood/SwiftFormat#config-file) in the root of your project. |
| 14 | +SwiftFormat runs any time a Swift document is saved in Nova, automatically reformatting code according to the default SwiftFormat [rules](https://github.com/nicklockwood/SwiftFormat#rules). You can customize the rules by creating a `.swiftformat` [config file](https://github.com/nicklockwood/SwiftFormat#config-file) in the root of your project. |
15 | 15 |
|
16 | 16 | To run SwiftFormat manually:
|
17 | 17 |
|
18 | 18 | - Select the **Editor → SwiftFormat** menu item; or
|
19 | 19 | - Open the command palette and type `SwiftFormat`
|
20 | 20 |
|
21 | 21 | ### Configuration
|
22 |
| -To configure global preferences, open **Extensions → Extension Library...** then select SwiftFormat's **Settings** tab. |
| 22 | +To configure global settings, open **Extensions → Extension Library...** then select SwiftFormat's **Settings** tab. |
23 | 23 |
|
24 |
| -You can also configure preferences on a per-project basis in **Project → Project Settings...** |
| 24 | +You can also configure settings on a per-project basis in **Project → Project Settings...** |
25 | 25 |
|
0 commit comments