summaryrefslogtreecommitdiffstats
path: root/compiler/swift.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-03-02 00:34:02 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2020-03-02 00:34:02 +0100
commit6b540d7db030e4110aa3a31dd06c6c41387444db (patch)
tree1cd1da5b35cf1c34b38d7506ff93aabf861747bf /compiler/swift.vim
parent35ea4d2b9072594b6c0ccf87bde7978ed9f94755 (diff)
downloadvim-polyglot-6b540d7db030e4110aa3a31dd06c6c41387444db.tar.gz
vim-polyglot-6b540d7db030e4110aa3a31dd06c6c41387444db.zip
Update
Diffstat (limited to 'compiler/swift.vim')
-rw-r--r--compiler/swift.vim43
1 files changed, 43 insertions, 0 deletions
diff --git a/compiler/swift.vim b/compiler/swift.vim
new file mode 100644
index 00000000..5dab34f6
--- /dev/null
+++ b/compiler/swift.vim
@@ -0,0 +1,43 @@
+if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'swift') == -1
+
+" Vim compiler file
+" Compiler: Swift Compiler
+" Maintainer: Ayman Bagabas <ayman.bagabas@gmail.com>
+" Latest Revision: 2020 Feb 16
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "swiftc"
+
+" vint: -ProhibitAbbreviationOption
+let s:save_cpo = &cpo
+set cpo&vim
+" vint: +ProhibitAbbreviationOption
+
+if exists(":CompilerSet") != 2
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+if has('patch-7.4.191')
+ CompilerSet makeprg=swiftc\ \%:S
+else
+ CompilerSet makeprg=swiftc\ \%
+endif
+
+CompilerSet errorformat=
+ \%E%f:%l:%c:\ %trror:\ %m,
+ \%W%f:%l:%c:\ %tarning:\ %m,
+ \%I%f:%l:%c:\ note:\ %m,
+ \%E%f:%l:\ %trror:\ %m,
+ \%W%f:%l:\ %tarning:\ %m,
+ \%I%f:%l:\ note:\ %m,
+
+" vint: -ProhibitAbbreviationOption
+let &cpo = s:save_cpo
+unlet s:save_cpo
+" vint: +ProhibitAbbreviationOption
+
+" vim: set et sw=4 sts=4 ts=8:
+
+endif