You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`apple-swift-format.enable`|`Bool`|`true`| Whether apple/swift-format should actually do something. ||
55
-
|`apple-swift-format.onlyEnableOnSwiftPMProjects`|`Bool`|`false`| Requires and uses a apple/swift-format as SwiftPM dependency. ||
55
+
|`apple-swift-format.onlyEnableOnSwiftPMProjects`|`Bool`|`false`| Requires and uses an apple/swift-format as SwiftPM dependency. This will cause the extension to build the Swift package upon first launch. ||
56
56
|`apple-swift-format.onlyEnableWithConfig`|`Bool`|`false`| Only format if config present. ||
57
57
|`apple-swift-format.path`|`[String] \| String`| platform dependent |`swift-format`| The location of the globally installed SwiftFormat (resolved with the current path if only a filename). |
58
58
|`apple-swift-format.configSearchPaths`|`[String]`|`[".swift-format"]`| Possible paths for apple/swift-format config. ||
59
59
60
+
Note that when `apple-swift-format.onlyEnableOnSwiftPMProjects` is enabled, the extension will only run `swift-format`
61
+
executables built as part of the Swift package open in the workspace. It will try to build the binary once on first
62
+
launch. If the build fails, the extension will not fall back to a globally installed `swift-format`. If you prefer a
63
+
locally built `swift-format`, but want to skip the automatic initial build, let `apple-swift-format.path` point to the
64
+
local executable you have built manually or by other means independent of the extension.
0 commit comments