Skip to content

Commit 0fe633b

Browse files
committed
Merge pull request #81 from dduan/highlight_line_directive
highlight Swift line directive [SE-0034]
2 parents 10b0d1b + 328a7c3 commit 0fe633b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

syntax/swift.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ syntax keyword swiftDebugIdentifier
210210
\ __FUNCTION__
211211
\ __LINE__
212212

213+
syntax keyword swiftLineDirective #setline
214+
213215
syntax region swiftTypeWrapper start="\v:\s*" skip="\s*,\s*$*\s*" end="$\|/"me=e-1 contains=ALLBUT,swiftInterpolatedWrapper transparent
214216
syntax region swiftGenericsWrapper start="\v\<" end="\v\>" contains=swiftType transparent oneline
215217
syntax region swiftLiteralWrapper start="\v\=\s*" skip="\v[^\[\]]\(\)" end="\v(\[\]|\(\))" contains=ALL transparent oneline
@@ -263,6 +265,7 @@ highlight default link swiftAvailability Normal
263265
highlight default link swiftAvailabilityArg Normal
264266
highlight default link swiftPlatforms Keyword
265267
highlight default link swiftDebugIdentifier PreProc
268+
highlight default link swiftLineDirective PreProc
266269

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

0 commit comments

Comments
 (0)