summaryrefslogtreecommitdiffstats
path: root/syntax/go.vim
diff options
context:
space:
mode:
Diffstat (limited to 'syntax/go.vim')
-rw-r--r--syntax/go.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/syntax/go.vim b/syntax/go.vim
index c025787e..8fb5d137 100644
--- a/syntax/go.vim
+++ b/syntax/go.vim
@@ -69,6 +69,10 @@ if !exists("g:go_highlight_methods")
let g:go_highlight_methods = 0
endif
+if !exists("g:go_highlight_fields")
+ let g:go_highlight_fields = 0
+endif
+
if !exists("g:go_highlight_structs")
let g:go_highlight_structs = 0
endif
@@ -310,6 +314,12 @@ if g:go_highlight_methods != 0
endif
hi def link goMethod Type
+" Fields;
+if g:go_highlight_fields != 0
+ syn match goField /\(\.\)\@<=\a\+\([\ \n\r\:\)]\)\@=/
+endif
+hi def link goField Type
+
" Structs;
if g:go_highlight_structs != 0
syn match goStruct /\(.\)\@<=\w\+\({\)\@=/