diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-01 21:09:53 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-01 22:29:03 -0400 |
commit | b1cd67b62e58c7f7d4139416e6813f8f50bc0fd6 (patch) | |
tree | e012d75f3c6853bebaa99b186209f8b9a53ea39c /runtime/syntax/swift.vim | |
parent | 710f0eae2f5a626a0771acbb1fb32e121bbf2bde (diff) | |
download | rneovim-b1cd67b62e58c7f7d4139416e6813f8f50bc0fd6.tar.gz rneovim-b1cd67b62e58c7f7d4139416e6813f8f50bc0fd6.tar.bz2 rneovim-b1cd67b62e58c7f7d4139416e6813f8f50bc0fd6.zip |
vim-patch:4072ba571bab
Update runtime files.
https://github.com/vim/vim/commit/4072ba571babd733d1800c082416fe8fe3c28ed7
Omit vim9 references.
Omit assert_fails(). Patch v8.2.1183 is not ported yet.
Diffstat (limited to 'runtime/syntax/swift.vim')
-rw-r--r-- | runtime/syntax/swift.vim | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/runtime/syntax/swift.vim b/runtime/syntax/swift.vim index 533d3fb7ac..ff07be29fa 100644 --- a/runtime/syntax/swift.vim +++ b/runtime/syntax/swift.vim @@ -21,10 +21,11 @@ let s:keepcpo = &cpo set cpo&vim syn keyword swiftKeyword - \ associatedtype \ break + \ case \ catch \ continue + \ default \ defer \ do \ else @@ -43,6 +44,10 @@ syn keyword swiftKeyword syn match swiftMultiwordKeyword \ "indirect case" +syn keyword swiftCoreTypes + \ Any + \ AnyObject + syn keyword swiftImport skipwhite skipempty nextgroup=swiftImportModule \ import @@ -93,10 +98,13 @@ syn keyword swiftTypeDefinition skipwhite skipempty nextgroup=swiftTypeName \ class \ enum \ extension + \ operator + \ precedencegroup \ protocol \ struct syn keyword swiftTypeAliasDefinition skipwhite skipempty nextgroup=swiftTypeAliasName + \ associatedtype \ typealias syn match swiftMultiwordTypeDefinition skipwhite skipempty nextgroup=swiftTypeName @@ -202,7 +210,7 @@ syn match swiftDecimal contained \ /[0-9]\+/ syn match swiftPreproc - \ /#\(\<file\>\|\<line\>\|\<function\>\)/ + \ /#\(\<column\>\|\<dsohandle\>\|\<file\>\|\<line\>\|\<function\>\)/ syn match swiftPreproc \ /^\s*#\(\<if\>\|\<else\>\|\<elseif\>\|\<endif\>\|\<error\>\|\<warning\>\)/ syn region swiftPreprocFalse @@ -213,9 +221,9 @@ syn match swiftAttribute syn keyword swiftTodo MARK TODO FIXME contained -syn match swiftCastOp skipwhite skipempty nextgroup=swiftType +syn match swiftCastOp skipwhite skipempty nextgroup=swiftType,swiftCoreTypes \ "\<is\>" -syn match swiftCastOp skipwhite skipempty nextgroup=swiftType +syn match swiftCastOp skipwhite skipempty nextgroup=swiftType,swiftCoreTypes \ "\<as\>[!?]\?" syn match swiftNilOps @@ -228,6 +236,7 @@ hi def link swiftImport Include hi def link swiftImportModule Title hi def link swiftImportComponent Identifier hi def link swiftKeyword Statement +hi def link swiftCoreTypes Type hi def link swiftMultiwordKeyword Statement hi def link swiftTypeDefinition Define hi def link swiftMultiwordTypeDefinition Define |