Vim syntax: highlight numbers and new keywords

This commit is contained in:
Nick Rolfe
2019-02-08 13:43:15 +00:00
parent fa07364214
commit 01fac31641

View File

@@ -1,11 +1,12 @@
syn keyword qlKeyword from where select predicate in as order by asc desc module syn keyword qlKeyword from where select predicate in as order by asc desc module result this super
syn keyword qlAnnotation abstract cached external final library noopt private syn keyword qlAnnotation abstract cached external final library noopt private
syn keyword qlLogic not and or implies exists forall forex any none syn keyword qlLogic not and or implies exists forall forex any none
syn keyword qlConditional if then else syn keyword qlConditional if then else
syn keyword qlType int float string boolean date syn keyword qlType int float string boolean date
syn keyword qlImport import nextgroup=qlQualified skipwhite syn keyword qlImport import nextgroup=qlQualified skipwhite
syn keyword qlTypeMod class extends instanceof nextgroup=qlType skipwhite syn keyword qlTypeMod class extends instanceof nextgroup=qlType skipwhite
syn keyword qlPredicate rank syn keyword qlAggregate avg concat count max min rank strictconcat strictcount strictsum sum
syn keyword qlConstant false true
syn match qlQualified "\v([a-zA-Z_]+\.)*[a-zA-Z_]+" syn match qlQualified "\v([a-zA-Z_]+\.)*[a-zA-Z_]+"
syn match qlComment "//.*$" contains=@Spell syn match qlComment "//.*$" contains=@Spell
@@ -13,6 +14,8 @@ syn match qlComparison "[!=<>]"
syn match qlVar "\v[a-zA-Z0-9_#]+" syn match qlVar "\v[a-zA-Z0-9_#]+"
syn match qlType "\v[@A-Z][a-zA-Z0-9_]+" syn match qlType "\v[@A-Z][a-zA-Z0-9_]+"
syn match qlPredicate "\v[a-zA-Z0-9_#@]+\ze\(" syn match qlPredicate "\v[a-zA-Z0-9_#@]+\ze\("
syn match qlInt "\d\+"
syn match qlFloat "\d\+\.\d\+"
syn region qlComment start="/\*" end="\*/" contains=@Spell syn region qlComment start="/\*" end="\*/" contains=@Spell
syn region qlString start=/\v"/ skip=/\v\\./ end=/\v"/ syn region qlString start=/\v"/ skip=/\v\\./ end=/\v"/
@@ -24,9 +27,13 @@ hi def link qlComparison Operator
hi def link qlAnnotation PreProc hi def link qlAnnotation PreProc
hi def link qlTypeMod Keyword hi def link qlTypeMod Keyword
hi def link qlLogic Keyword hi def link qlLogic Keyword
hi def link qlAggregate Keyword
hi def link qlPredicate Function hi def link qlPredicate Function
hi def link qlConditional Conditional hi def link qlConditional Conditional
hi def link qlType Type hi def link qlType Type
hi def link qlConstant Constant
hi def link qlInt Number
hi def link qlFloat Float
if !exists("g:qlVarNoHighlight") if !exists("g:qlVarNoHighlight")
hi def link qlVar Identifier hi def link qlVar Identifier
endif endif