Skip to content

Commit 10b0d1b

Browse files
committed
Merge pull request #80 from dduan/add_swift_builtin_expr
highlight Swift builtin debug identifiers
2 parents a7afa7d + 1817bc4 commit 10b0d1b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

syntax/swift.vim

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,16 @@ syntax keyword swiftStructure
200200
\ struct
201201
\ enum
202202

203+
syntax keyword swiftDebugIdentifier
204+
\ #column
205+
\ #file
206+
\ #function
207+
\ #line
208+
\ __COLUMN__
209+
\ __FILE__
210+
\ __FUNCTION__
211+
\ __LINE__
212+
203213
syntax region swiftTypeWrapper start="\v:\s*" skip="\s*,\s*$*\s*" end="$\|/"me=e-1 contains=ALLBUT,swiftInterpolatedWrapper transparent
204214
syntax region swiftGenericsWrapper start="\v\<" end="\v\>" contains=swiftType transparent oneline
205215
syntax region swiftLiteralWrapper start="\v\=\s*" skip="\v[^\[\]]\(\)" end="\v(\[\]|\(\))" contains=ALL transparent oneline
@@ -252,6 +262,7 @@ highlight default link swiftConditionStatement PreProc
252262
highlight default link swiftAvailability Normal
253263
highlight default link swiftAvailabilityArg Normal
254264
highlight default link swiftPlatforms Keyword
265+
highlight default link swiftDebugIdentifier PreProc
255266

256267
" Force vim to sync at least x lines. This solves the multiline comment not
257268
" being highlighted issue

0 commit comments

Comments
 (0)