Skip to content

Commit 0cc1701

Browse files
committed
Allow flowtype annotation for arrow func return val
1 parent c87bb43 commit 0cc1701

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

syntax/javascript.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ syntax keyword jsForAwait contained await skipwhite skipempty nextgr
174174
" Matches a single keyword argument with no parens
175175
syntax match jsArrowFuncArgs /\k\+\s*\%(=>\)\@=/ skipwhite contains=jsFuncArgs skipwhite skipempty nextgroup=jsArrowFunction extend
176176
" Matches a series of arguments surrounded in parens
177-
syntax match jsArrowFuncArgs /([^()]*)\s*\(=>\)\@=/ contains=jsFuncArgs skipempty skipwhite nextgroup=jsArrowFunction extend
177+
syntax match jsArrowFuncArgs /([^()]*)[^()=]*\(=>\)\@=/ contains=jsFuncArgs skipempty skipwhite nextgroup=jsArrowFunction extend
178178

179179
exe 'syntax match jsFunction /\<function\>/ skipwhite skipempty nextgroup=jsGenerator,jsFuncName,jsFuncArgs skipwhite '.(exists('g:javascript_conceal_function') ? 'conceal cchar='.g:javascript_conceal_function : '')
180180
exe 'syntax match jsArrowFunction /=>/ skipwhite skipempty nextgroup=jsFuncBlock,jsCommentFunction '.(exists('g:javascript_conceal_arrow_function') ? 'conceal cchar='.g:javascript_conceal_arrow_function : '')

0 commit comments

Comments
 (0)