vknabel / vscode-swiftformat

SwiftFormat for VS Code
https://marketplace.visualstudio.com/items?itemName=vknabel.vscode-swiftformat
MIT License
39 stars 7 forks source link

How to use #8

Closed Myk-da-Beast closed 4 years ago

Myk-da-Beast commented 5 years ago

So does this work automatically? Does it happen when I save? If I type swiftformat . into the terminal it works but isn't that how it would behave without this extension?

vknabel commented 5 years ago

Hi @Myk-da-Beast! The swiftformat from the terminal is the driver for this extension.

This extension adds support for the Format document-command for Swift files of VS Code. By default you can manually trigger it using ⇧⌥F as in this cheat sheet. You can also manually search for the command by opening the command palette using ⇧⌘P.

If you wish to automatically format documents on save add "editor.formatOnSave": true to your settings.