@@ -109,8 +109,8 @@ GoDeferCleanup delcom GoFoldStruct
109
109
110
110
" Two top-level clusters to allow regions to specify what syntax they can
111
111
" contain
112
- syntax cluster goExpr contains =@goLiteral,goDotExpr,goFuncLiteral,goCommaExpr,goOperator,goWordStart,goParenBlock,goBracketBlock
113
- syntax cluster goStatement contains =@goExpr,@goFlowControl,goReturn,goSemicolon,goBraceBlock,goComment, goStatementStart,goConstDecl,goVarDecl,goTypeDecl,goKeywords
112
+ syntax cluster goExpr contains =@goLiteral,goDotExpr,goFuncLiteral,goCommaExpr,goOperator,goWordStart,goParenBlock,goBracketBlock,goComment
113
+ syntax cluster goStatement contains =@goExpr,@goFlowControl,goReturn,goSemicolon,goBraceBlock,goStatementStart,goConstDecl,goVarDecl,goTypeDecl,goKeywords
114
114
115
115
syntax match goIdentifier / \K\k */ contained nextgroup =goDotExpr skipwhite
116
116
@@ -307,8 +307,8 @@ syntax keyword goVarDecl var skipwhite skipnl nextgroup=goVarIdentifier,goVa
307
307
" syntax region goVarDeclGroup matchgroup=goVarDeclParens start='(' end=')' contained contains=@goExpr,goComment,goSemicolon,goVarGroupIdentifier
308
308
" syntax region goConstDeclGroup matchgroup=goConstDeclParens start='(' end=')' contained contains=@goExpr,goComment,goSemicolon,goVarGroupIdentifier,goIota
309
309
310
- syntax region goVarDeclGroup matchgroup =goVarDeclParens start =' (' end =' )' contained contains =@goExpr,goComment, goSemicolon,goVarIdentifier
311
- syntax region goConstDeclGroup matchgroup =goConstDeclParens start =' (' end =' )' contained contains =@goExpr,goComment, goSemicolon,goVarIdentifier,goIota
310
+ syntax region goVarDeclGroup matchgroup =goVarDeclParens start =' (' end =' )' contained contains =@goExpr,goSemicolon,goVarIdentifier
311
+ syntax region goConstDeclGroup matchgroup =goConstDeclParens start =' (' end =' )' contained contains =@goExpr,goSemicolon,goVarIdentifier,goIota
312
312
313
313
" TODO: Is it worth supporting comments in goVarComma??
314
314
syntax match goVarIdentifier / \<\K\k */ contained skipwhite nextgroup =goVarComma,@goType
@@ -438,7 +438,7 @@ syntax match goSliceOrArrayLiteral /\k\@1<!\[[0-9.]*\]\ze\%(\*\|\K\|\[\|(\)/ con
438
438
syntax region goSliceLiteralType start =' \S ' end =' \z e{\| $' contained contains =goSliceLiteralTypeMatch skipwhite skipnl nextgroup =goSliceItems
439
439
syntax match goSliceLiteralTypeMatch / \% (\% (interface\| struct\)\s *{\| [^{]\)\+ / contained contains =@goType
440
440
441
- syntax region goSliceItems matchgroup =goSliceBraces start =' {' end =' }' contained contains =goStructLiteralBlock,@goExpr,goComment
441
+ syntax region goSliceItems matchgroup =goSliceBraces start =' {' end =' }' contained contains =goStructLiteralBlock,@goExpr
442
442
443
443
syntax match goChannel / <-chan/ contained contains =goChannelDir skipwhite nextgroup =@goType
444
444
syntax match goChannel / chan\% (<-\)\? / contained contains =goChannelDir skipwhite nextgroup =@goType
@@ -578,7 +578,7 @@ syntax region goStructLiteralTypeArgs matchgroup=goTypeParamBrackets start='\['
578
578
" goStructLiteralBlock contains itself to 1) prevent weird highlighting while
579
579
" typing, and 2) allow slice literals of slices of structs to highlight
580
580
" correctly
581
- GoFoldStruct syntax region goStructLiteralBlock matchgroup= goStructBraces start = ' {' end = ' }' contained contains= goStructLiteralField,goComma,@g oExpr,goComment, goStructLiteralBlock
581
+ GoFoldStruct syntax region goStructLiteralBlock matchgroup= goStructBraces start = ' {' end = ' }' contained contains= goStructLiteralField,goComma,@g oExpr,goStructLiteralBlock
582
582
583
583
syntax match goStructLiteralField / \<\K\k *\z e:/ contained nextgroup =goStructLiteralColon
584
584
syntax match goStructLiteralColon / :/ contained
0 commit comments