diff options
author | bosr <bosr@users.noreply.github.com> | 2021-04-07 12:34:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-07 19:34:34 +0900 |
commit | f0887d3e6178482255f11aa378124aef3699245f (patch) | |
tree | ce9b0300de08ab7220ab63ed4e857da876367f9f /doc | |
parent | 06f57ca9733aab6e6b67015917fdfd4bf1c70c48 (diff) | |
download | ale-f0887d3e6178482255f11aa378124aef3699245f.zip |
apple-swift-format: linter and fixer with config swiftpm support (#3671)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ale-swift.txt | 39 | ||||
-rw-r--r-- | doc/ale.txt | 1 |
2 files changed, 40 insertions, 0 deletions
diff --git a/doc/ale-swift.txt b/doc/ale-swift.txt index 8fa0c06c..6d53ca7c 100644 --- a/doc/ale-swift.txt +++ b/doc/ale-swift.txt @@ -3,6 +3,44 @@ ALE Swift Integration *ale-swift-options* =============================================================================== +apple-swift-format *ale-swift-apple-swift-format* + +There are 3 options to enable linting and fixing with Apple's swift-format: + +1. Install the local executable in your path, as described here: + https://github.com/apple/swift-format +2. Install the executable via your OS package manager, for instance via + Homebrew with `brew install swift-format` +3. Your Swift project has a dependency on the swift-format package, so it can + be run with `swift run swift-format lint ...` In this case, you need to set + a variable, see |g:ale_swift_appleswiftformat_use_swiftpm|. + +Additionally, ALE tries to locate and use the nearest existing `.swift-format` +configuration file. + + +g:ale_swift_appleswiftformat_executable *g:ale_swift_appleswiftformat_executable* + *b:ale_swift_appleswiftformat_executable* + Type: |String| + Default: `'swift-format'` + + This variable can be modified to change the executable path for + `swift-format`. + + +g:ale_swift_appleswiftformat_use_swiftpm *g:ale_swift_appleswiftformat_use_swiftpm* + *b:ale_swift_appleswiftformat_use_swiftpm* + Type: |Number| + Default: `0` + + When set to `1`, this option will cause ALE to use + `swift run swift-format lint ...` instead of the global executable. Use this + option if your Swift project has a dependency on the swift-format package. + + See |ale-integrations-local-executables| + + +=============================================================================== sourcekitlsp *ale-swift-sourcekitlsp* To enable the SourceKit-LSP you need to install and build the executable as @@ -16,6 +54,7 @@ g:ale_sourcekit_lsp_executable *g:ale_sourcekit_lsp_executable* See |ale-integrations-local-executables| + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/doc/ale.txt b/doc/ale.txt index 84d4b096..682db80d 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -3021,6 +3021,7 @@ documented in additional help files. prettier..............................|ale-svelte-prettier| svelteserver..........................|ale-svelte-svelteserver| swift...................................|ale-swift-options| + apple-swift-format....................|ale-swift-apple-swift-format| sourcekitlsp..........................|ale-swift-sourcekitlsp| systemd.................................|ale-systemd-options| systemd-analyze.......................|ale-systemd-analyze| |