Skip to content

Commit 6b8eae0

Browse files
committed
vim: consider optionality as part of the type
Include the optionality of a type as part of the type name.
1 parent 980b408 commit 6b8eae0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/vim/syntax/swift.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ syn keyword swiftFuncKeyword nextgroup=swiftTypeParameters
6969

7070
syn keyword swiftTypeDefinition class extension protocol struct typealias enum skipwhite nextgroup=swiftTypeName
7171

72-
syn match swiftTypeName /\<[A-Za-z_][A-Za-z_0-9\.]*\>/ contained nextgroup=swiftTypeParameters
72+
syn match swiftTypeName /\<[A-Za-z_][A-Za-z_0-9\.]*\>[!?]\?/ contained nextgroup=swiftTypeParameters
7373
syn region swiftArrayType start=/\[/ end=/\]/ contained skipwhite nextgroup=swiftTypeName
7474

7575
syn region swiftTypeParameters start="<" end=">" contained

0 commit comments

Comments
 (0)