Use apple/swift-format in Vim
- for ale plugin
mkdir -p ~/.vim/pack/git-plugins/start
git clone https://github.com/tokorom/vim-swift-format.git ~/.vim/pack/git-plugins/start/fim-swift-format
Plug 'tokorom/vim-swift-format'
volt get tokorom/vim-swift-format
let g:ale_linters = {
\ 'swift': ['swift-format'],
\}
let g:vim_swift_format_use_ale = 1
" default
let g:vim_swift_format_executable = 'swift-format'
let g:vim_swift_format_lint_command = 'swift-format lint %s'
let g:vim_swift_format_format_command = 'swift-format format --in-place %s'
:SwiftFormatFormat