@@ -6,7 +6,7 @@ syntax region jsFlowExactObject contained matchgroup=jsFlowNoise start=/{|/
6
6
syntax region jsFlowParens contained matchgroup =jsFlowNoise start =/ (/ end =/ )/ contains =@jsFlowCluster keepend fold
7
7
syntax match jsFlowNoise contained / [:;,<>]/
8
8
syntax keyword jsFlowType contained boolean number string null void any mixed JSON array Function object array bool class
9
- syntax keyword jsFlowTypeof contained typeof skipempty skipempty nextgroup =jsFlowTypeCustom,jsFlowType
9
+ syntax keyword jsFlowTypeof contained typeof skipempty skipwhite nextgroup =jsFlowTypeCustom,jsFlowType
10
10
syntax match jsFlowTypeCustom contained / [0-9a-zA-Z_.]*/ skipwhite skipempty nextgroup =jsFlowGroup
11
11
syntax region jsFlowGroup contained matchgroup =jsFlowNoise start =/ </ end =/ >/ contains =@jsFlowCluster
12
12
syntax region jsFlowArrowArguments contained matchgroup =jsFlowNoise start =/ (/ end =/ )\% (\s *=>\)\@ =/ oneline skipwhite skipempty nextgroup =jsFlowArrow contains =@jsFlowCluster
@@ -26,6 +26,7 @@ syntax match jsFlowReturnMaybe contained /?/ skipwhite skipempty nextgroup=
26
26
syntax region jsFlowReturnGroup contained matchgroup =jsFlowNoise start =/ </ end =/ >/ contains =@jsFlowCluster skipwhite skipempty nextgroup =jsFuncBlock,jsFlowReturnOrOp
27
27
syntax match jsFlowReturnOrOp contained / \s *|\s */ skipwhite skipempty nextgroup =@jsFlowReturnCluster
28
28
syntax match jsFlowWildcardReturn contained / */ skipwhite skipempty nextgroup =jsFuncBlock
29
+ syntax keyword jsFlowTypeofReturn contained typeof skipempty skipwhite nextgroup =@jsFlowReturnCluster
29
30
30
31
syntax region jsFlowFunctionGroup contained matchgroup =jsFlowNoise start =/ </ end =/ >/ contains =@jsFlowCluster skipwhite skipempty nextgroup =jsFuncArgs
31
32
syntax region jsFlowClassGroup contained matchgroup =jsFlowNoise start =/ </ end =/ >/ contains =@jsFlowCluster skipwhite skipempty nextgroup =jsClassBlock
@@ -41,8 +42,8 @@ syntax keyword jsFlowDeclare declare skipwhite skipempty nextgr
41
42
syntax match jsFlowClassProperty contained / \< [0-9a-zA-Z_$]*\> :\@ =/ skipwhite skipempty nextgroup =jsFlowClassDef containedin =jsClassBlock
42
43
syntax region jsFlowClassDef contained start =/ :/ end =/ \% (\s *[,=;)\n ]\)\@ =/ contains =@jsFlowCluster skipwhite skipempty nextgroup =jsClassValue
43
44
44
- syntax region jsFlowModule contained start =/ module/ end =/ {\@ =/ skipempty skipempty nextgroup =jsFlowDeclareBlock contains =jsString
45
- syntax region jsFlowInterface contained start =/ interface/ end =/ {\@ =/ skipempty skipempty nextgroup =jsFlowInterfaceBlock contains =@jsFlowCluster
45
+ syntax region jsFlowModule contained start =/ module/ end =/ {\@ =/ skipempty skipwhite nextgroup =jsFlowDeclareBlock contains =jsString
46
+ syntax region jsFlowInterface contained start =/ interface/ end =/ {\@ =/ skipempty skipwhite nextgroup =jsFlowInterfaceBlock contains =@jsFlowCluster
46
47
syntax region jsFlowDeclareBlock contained matchgroup =jsFlowNoise start =/ {/ end =/ }/ contains =jsFlowDeclare,jsFlowNoise fold
47
48
48
49
" NOTE: It appears the nextgroup was causing a ton of breakages... testing it
@@ -53,7 +54,7 @@ syntax region jsFlowInterfaceBlock contained matchgroup=jsFlowNoise start=/{/ e
53
54
54
55
syntax region jsFlowParenAnnotation contained start =/ :/ end =/ [,=)]\@ =/ containedin =jsParen contains =@jsFlowCluster
55
56
56
- syntax cluster jsFlowReturnCluster contains =jsFlowNoise,jsFlowReturnObject,jsFlowReturnArray,jsFlowReturnKeyword,jsFlowReturnGroup,jsFlowReturnMaybe,jsFlowReturnOrOp,jsFlowWildcardReturn,jsFlowReturnArrow
57
+ syntax cluster jsFlowReturnCluster contains =jsFlowNoise,jsFlowReturnObject,jsFlowReturnArray,jsFlowReturnKeyword,jsFlowReturnGroup,jsFlowReturnMaybe,jsFlowReturnOrOp,jsFlowWildcardReturn,jsFlowReturnArrow,jsFlowTypeofReturn
57
58
syntax cluster jsFlowCluster contains =jsFlowArray,jsFlowObject,jsFlowExactObject,jsFlowNoise,jsFlowTypeof,jsFlowType,jsFlowGroup,jsFlowArrowArguments,jsFlowMaybe,jsFlowParens,jsFlowOrOperator,jsFlowWildcard
58
59
59
60
if version >= 508 || ! exists (" did_javascript_syn_inits" )
@@ -69,6 +70,7 @@ if version >= 508 || !exists("did_javascript_syn_inits")
69
70
HiLink jsFlowType Type
70
71
HiLink jsFlowTypeCustom PreProc
71
72
HiLink jsFlowTypeof PreProc
73
+ HiLink jsFlowTypeofReturn PreProc
72
74
HiLink jsFlowArray PreProc
73
75
HiLink jsFlowObject PreProc
74
76
HiLink jsFlowExactObject PreProc
0 commit comments