Skip to content

Commit 2b84b38

Browse files
committed
Fix Generator definitions
Tacking this on since it relates to ES6 functions. The generator astericks were breaking the highlighting of function arguments. This should fix generators
1 parent fdfabc8 commit 2b84b38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

syntax/javascript.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ endif
216216
exe 'syntax match jsFunction /\<function\>/ nextgroup=jsGenerator,jsFuncName,jsFuncArgs skipwhite '.(exists('g:javascript_conceal_function') ? 'conceal cchar='.g:javascript_conceal_function : '')
217217
exe 'syntax match jsArrowFunction /=>/ skipwhite nextgroup=jsFuncBlock contains=jsFuncBraces '.(exists('g:javascript_conceal_arrow_function') ? 'conceal cchar='.g:javascript_conceal_arrow_function : '')
218218

219-
syntax match jsGenerator contained '\*' nextgroup=jsFuncName skipwhite
219+
syntax match jsGenerator contained '\*' nextgroup=jsFuncName,jsFuncArgs skipwhite
220220
syntax match jsFuncName contained /\<[a-zA-Z_$][0-9a-zA-Z_$]*/ nextgroup=jsFuncArgs skipwhite
221221
syntax region jsFuncArgs contained matchgroup=jsFuncParens start='(' end=')' contains=jsFuncArgCommas,jsFuncArgRest,jsAssignmentExpr,jsComment,jsLineComment nextgroup=jsFuncBlock keepend skipwhite skipempty
222222
syntax match jsFuncArgCommas contained ','

0 commit comments

Comments
 (0)