|
@@ -28,8 +28,8 @@ if g:go_highlight_types != 0
|
|
|
|
|
|
|
|
syn match goTypeDecl /\<type\>/ nextgroup=goNewDeclType,goTypeRegion skipwhite skipnl
|
|
syn match goTypeDecl /\<type\>/ nextgroup=goNewDeclType,goTypeRegion skipwhite skipnl
|
|
|
syn region goTypeRegion matchgroup=goContainer start=/(/ end=/)/ contains=@validTypeContains fold contained
|
|
syn region goTypeRegion matchgroup=goContainer start=/(/ end=/)/ contains=@validTypeContains fold contained
|
|
|
- syn region goDeclStructRegion matchgroup=goContainer start=/{/ end=/}/ contains=@validStructContains fold keepend contained
|
|
|
|
|
- syn region goDeclInterfaceRegion matchgroup=goContainer start=/{/ end=/}/ contains=@validInterfaceContains fold keepend contained
|
|
|
|
|
|
|
+ syn region goDeclStructRegion matchgroup=goContainer start=/{/ end=/}/ contains=@validStructContains fold contained
|
|
|
|
|
+ syn region goDeclInterfaceRegion matchgroup=goContainer start=/{/ end=/}/ contains=@validInterfaceContains fold contained
|
|
|
|
|
|
|
|
" Match \w+\.\w+ but only highlight lone \w+ or (?>\.)\w+
|
|
" Match \w+\.\w+ but only highlight lone \w+ or (?>\.)\w+
|
|
|
syn match goDeclTypeW /\%(\w\+\.\)\?\w\+\(\[.*\]\S\+\)\?/ contains=goDeclTypeNS,goDeclTypeType,goDeclTypeMap,ContainerChars,OperatorChars,goDeclaration skipwhite contained
|
|
syn match goDeclTypeW /\%(\w\+\.\)\?\w\+\(\[.*\]\S\+\)\?/ contains=goDeclTypeNS,goDeclTypeType,goDeclTypeMap,ContainerChars,OperatorChars,goDeclaration skipwhite contained
|
|
@@ -58,9 +58,9 @@ if g:go_highlight_functions != 0
|
|
|
syn match goFunctionCall /\(\.\)\@1<!\w\+\((\)\@1=/
|
|
syn match goFunctionCall /\(\.\)\@1<!\w\+\((\)\@1=/
|
|
|
|
|
|
|
|
"TODO: add goDeclTypeW
|
|
"TODO: add goDeclTypeW
|
|
|
- syn cluster validFuncRegionContains contains=@goTypes,goField,goDeclaration,GoBuiltins,goDeclStruct,goDeclInterface,OperatorChars,ContainerChars,goString,goRawString,@goNumber,goTypeConstructor,goMethodCall
|
|
|
|
|
|
|
+ syn cluster validFuncRegionContains contains=@goTypes,goField,goDeclaration,goBuiltins,goDeclStruct,goDeclInterface,OperatorChars,ContainerChars,goString,goRawString,@goNumber,goTypeConstructor,goMethodCall
|
|
|
|
|
|
|
|
- syn match goFunctionTagLine /\w\+(.*)\(\s*(.*)\|\s\S\+\)\?/ nextgroup=goFunction contains=goFunction,goFunctionParamRegion,goFunctionReturnRegion,goFunctionReturn,OperatorChars,ContainerChars,goComment
|
|
|
|
|
|
|
+ syn match goFunctionTagLine /\w\+(.*)\(\s*(.*)\|\s\+\S\+\)\?/ nextgroup=goFunction contains=goFunction,goFunctionParamRegion,goFunctionReturnRegion,goFunctionReturn,OperatorChars,ContainerChars,goComment
|
|
|
syn region goFunctionParamRegion matchgroup=goContainer start=/(/ end=/)/ contains=@validFuncRegionContains nextgroup=goFunctionReturnRegion,goFunctionReturn skipwhite keepend contained
|
|
syn region goFunctionParamRegion matchgroup=goContainer start=/(/ end=/)/ contains=@validFuncRegionContains nextgroup=goFunctionReturnRegion,goFunctionReturn skipwhite keepend contained
|
|
|
syn region goFunctionReturnRegion matchgroup=goContainer start=/(/ end=/)/ contains=@validFuncRegionContains skipwhite keepend contained
|
|
syn region goFunctionReturnRegion matchgroup=goContainer start=/(/ end=/)/ contains=@validFuncRegionContains skipwhite keepend contained
|
|
|
syn match goFunctionReturn /\w\+/ contains=@validFuncRegionContains skipwhite contained
|
|
syn match goFunctionReturn /\w\+/ contains=@validFuncRegionContains skipwhite contained
|