Swift
Swift code formatter (SwiftFormat wrapper).
Wrapper plugin that formats Swift code via bundled SwiftFormat.
Formats .swift files on macOS and Linux (x86_64 and aarch64).
Install and Setup
In your project's directory with a dprint.json file, run:
dprint add drluckyspin/swift
This will update your config file to have an entry for the plugin. Then optionally specify a "swiftformat" property to add configuration:
{
"swiftformat": {
"swiftVersion": "5.9"
},
"plugins": [
"https://plugins.dprint.dev/drluckyspin/swift-v0.1.0.json@faab1002bf499512dc2003198b844bf582cc6438d0dcab672be48478b5fcbafa"
]
}
Update to the latest release with dprint config update.
Configuration
See the plugin repository for configuration options and the JSON schema:
You can also keep a .swiftformat file in your project. The plugin passes --stdinpath so SwiftFormat discovers it automatically.
All plugins
Official Plugins
Community Plugins
Wrapper Plugins
Process
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Process
Wasm
Wasm
Wasm
Wasm
Wasm