go.vim 847 B

12345678910111213141516171819202122232425
  1. hi def link goMethodCall Function
  2. hi def link goFunctionCall Function
  3. if !exists("g:go_highlight_fields")
  4. let g:go_highlight_fields = 0
  5. endif
  6. if g:go_highlight_fields != 0
  7. syn match goField /\(\.\)\@<=\w\+\([.\ \n\r\:\)\[,]\)\@=/
  8. endif
  9. if !exists("g:go_highlight_functions")
  10. let g:go_highlight_functions = 0
  11. endif
  12. if g:go_highlight_functions != 0
  13. " Why no work when not directly in vim-go/syntax/go.vim? :(
  14. syn match goReceiver /\((\)\@<=\zs\(\w\|[ *]\)\+\ze\()\)\@=/ contained nextgroup=goFunction contains=goReceiverVar skipwhite skipnl
  15. endif
  16. if !exists("g:go_highlight_types")
  17. let g:go_highlight_types = 0
  18. endif
  19. if g:go_highlight_types != 0
  20. " Also doesn't work, again only when not directly in vim-go/syntax/go.vim
  21. syn match goTypeConstructor /\zs\<\w\+\ze\({\)\@=/
  22. endif