Skip to content

Commit

Permalink
vim: re-organise import keyword, component highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
compnerd committed Jun 4, 2016
1 parent 91ec0e3 commit 63e6759
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions utils/vim/syntax/swift.vim
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ if exists("b:current_syntax")
finish
endif

syn keyword swiftImport import skipwhite nextgroup=swiftImportModule

syn match swiftImportModule /\<[A-Za-z_][A-Za-z_0-9]*\>/ contained nextgroup=swiftImportComponent
syn match swiftImportComponent /\.\<[A-Za-z_][A-Za-z_0-9]*\>/ contained nextgroup=swiftImportComponent

syn keyword swiftKeyword
\ associatedtype
\ break
Expand Down Expand Up @@ -49,6 +44,9 @@ syn keyword swiftKeyword
\ where
\ while

syn keyword swiftImport skipwhite nextgroup=swiftImportModule
\ import

syn keyword swiftDefinitionModifier
\ dynamic
\ internal
Expand Down Expand Up @@ -92,6 +90,11 @@ syn keyword swiftVarDefinition skipwhite nextgroup=swiftVarName
\ let
\ var

syn match swiftImportModule contained nextgroup=swiftImportComponent
\ /\<[A-Za-z_][A-Za-z_0-9]*\>/
syn match swiftImportComponent contained nextgroup=swiftImportComponent
\ /\.\<[A-Za-z_][A-Za-z_0-9]*\>/

syn match swiftTypeName contained nextgroup=swiftTypeParameters
\ /\<[A-Za-z_][A-Za-z_0-9\.]*\>/
syn match swiftVarName contained skipwhite nextgroup=swiftTypeDeclaration
Expand Down

0 comments on commit 63e6759

Please sign in to comment.