File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,10 @@ if !exists("g:go_highlight_string_spellcheck")
81
81
let g: go_highlight_string_spellcheck = 1
82
82
endif
83
83
84
+ if ! exists (" g:go_highlight_generate_tags" )
85
+ let g: go_highlight_generate_tags = 0
86
+ endif
87
+
84
88
syn case match
85
89
86
90
syn keyword goDirective package import
@@ -132,11 +136,18 @@ hi def link goBoolean Boolean
132
136
syn keyword goTodo contained TODO FIXME XXX BUG
133
137
syn cluster goCommentGroup contains =goTodo
134
138
syn region goComment start =" /\* " end =" \* /" contains =@goCommentGroup,@Spell
135
- syn region goComment start =" //" end =" $" contains =@goCommentGroup,@Spell
139
+ syn region goComment start =" //" end =" $" contains =goGenerate, @goCommentGroup,@Spell
136
140
137
141
hi def link goComment Comment
138
142
hi def link goTodo Todo
139
143
144
+ if g: go_highlight_generate_tags != 0
145
+ syn match goGenerateVariables contained / \(\$ GOARCH\|\$ GOOS\|\$ GOFILE\|\$ GOLINE\|\$ GOPACKAGE\|\$ DOLLAR\)\> /
146
+ syn region goGenerate start =" ^\s *//go:generate" end =" $" contains =goGenerateVariables
147
+ hi def link goGenerate PreProc
148
+ hi def link goGenerateVariables Special
149
+ endif
150
+
140
151
" Go escapes
141
152
syn match goEscapeOctal display contained " \\ [0-7]\{ 3}"
142
153
syn match goEscapeC display contained + \\ [abfnrtv\\ '"]+
You can’t perform that action at this time.
0 commit comments