Skip to content

Commit 9a25b23

Browse files
committed
Readme tweaks
1 parent beae68e commit 9a25b23

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
**SwiftFormat** integrates Nick Lockwood's [SwiftFormat](https://github.com/nicklockwood/SwiftFormat) with [Nova](https://panic.com/nova).
2+
3+
This extension will run the formatter when a Swift document is saved. It can also be invoked as an editor command.
4+
5+
![](https://raw.githubusercontent.com/PadraigK/swiftformat-nova/main/Images/screenshot.png)
6+
7+
## Installation
8+
9+
If you have Nova installed on your Mac, you can [install the extension](nova://extension/?id=org.padraig.SwiftFormat&name=SwiftFormat) from the extension library, or using the [Install](https://extensions.panic.com/extensions/org.padraig/org.padraig.SwiftFormat/) link on Panic's website.
10+
11+
The SwiftFormat extension includes a built-in version of the actual formatter tool, so no additional setup is required.
12+
13+
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.
14+
15+
## Usage
16+
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.
17+
18+
To run SwiftFormat manually:
19+
20+
- Select the **Editor → SwiftFormat** menu item; or
21+
- Open the command palette and type `SwiftFormat`
22+
23+
### Configuration
24+
To configure global settings, open **Extensions → Extension Library...** then select SwiftFormat's **Settings** tab.
25+
26+
You can also configure settings on a per-project basis in **Project → Project Settings...**
27+
28+
## Contributing and Collaboration
29+
30+
I'd love to hear from you! Get in touch via [mastodon](https://mastodon.social/@PadraigOCinneide), an issue, or a pull request.
31+
32+
By participating in this project you agree to abide by the [Contributor Code of Conduct](CODE_OF_CONDUCT.md).

0 commit comments

Comments
 (0)