Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
src
.editorconfig
.gitignore
.nvmrc
.vscodeignore
CHANGELOG.md
LICENSE
README.md
package.json
tsconfig.json
yarn.lock

README.md

SwiftFormat for VS Code

Prettify your Swift code automatically via SwiftFormat. You can use SwiftFormat installed globally or via the Swift Package Manager.

Global Installation

You can install SwiftFormat globally using Homebrew or Mint

# Using Homebrew
$ brew update && brew install swiftformat
# Using Mint
$ mint install nicklockwood/SwiftFormat

Local Installation

Add the package to your dependencies in Package.swift:

// swift-tools-version:4.2

import PackageDescription

let package = Package(
    name: "Komondor",
    products: [ ... ],
    dependencies: [
        // My dependencies
        .package(url: "https://github.com/orta/PackageConfig.git", from: "0.0.1"),
        // Dev deps
        .package(url: "https://github.com/orta/Komondor.git", from: "0.0.1"),
+        .package(url: "https://github.com/nicklockwood/SwiftFormat.git", from: "0.35.8"),
    ],
    targets: [...]
)

Configuration

Config Type Default Description
swiftformat.enable Bool true Whether SwiftFormat should actually do something.
swiftformat.path String /usr/local/bin/swiftformat The location of the globally installed SwiftFormat.
swiftformat.options [String] [] Additional parameters for SwiftFormat.

Contributors

License

vscode-swiftformat is available under the MIT license.