swiftb

swiftb is a Vim plugin I made to support open-source Swift (the swift.org version) syntax checking in Syntastic which is itself a Vim plugin. The code is on GitHub.

Behind the scenes it is using swift build — the build option available only in the open-source toolchain so far. The errors are the same that you can find in Xcode, and Syntastic makes them available with line marks and both command window and location list. Though I have an option set which prevents the location list from opening automatically, it can only close if there are no more errors:

let g:syntastic_auto_loc_list = 2

Sadly there is no autocompletion yet. There is decent support via SourceKitten but it’s only working for Xcode projects. I only have Package.swift :)

2016   Swift
Popular