Observations, stories, projects, photos.

In English and Russian.

swiftb

Jan 15, 2016, 2:42

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 :)

Your comment
won’t be published

HTML will not work

Ctrl + Enter
Popular