mirror of
https://github.com/dense-analysis/ale.git
synced 2026-05-19 23:09:58 +08:00
Add support for SwiftFormat as a fixer
SwiftFormat is a tool that can be used to format Swift files. This commit adds support for using SwiftFormat as a fixer from ALE. It looks for executables in the Pods directory, then the Pods directory for a React Native project, then finally falls back to the globally installed instance if neither of those were found. https://github.com/nicklockwood/SwiftFormat
This commit is contained in:
@@ -72,6 +72,11 @@ let s:default_registry = {
|
||||
\ 'suggested_filetypes': ['css', 'sass', 'scss', 'stylus'],
|
||||
\ 'description': 'Fix stylesheet files using stylelint --fix.',
|
||||
\ },
|
||||
\ 'swiftformat': {
|
||||
\ 'function': 'ale#fixers#swiftformat#Fix',
|
||||
\ 'suggested_filetypes': ['swift'],
|
||||
\ 'description': 'Apply SwiftFormat to a file.',
|
||||
\ },
|
||||
\}
|
||||
|
||||
" Reset the function registry to the default entries.
|
||||
|
||||
Reference in New Issue
Block a user