Skip to content

Commit ecc674f

Browse files
authored
flow generic classes (#652)
1 parent 572b98d commit ecc674f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

indent/javascript.vim

+3-2
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@ endfunction
115115
function s:IsBlock()
116116
return getline(line('.'))[col('.')-1] == '{' && !search('\C\<return\s*\%#','nbW') && (search('\l\_s*\%#','bW') ? expand('<cword>') !~#
117117
\ '\<\%(var\|const\|let\|\%(im\|ex\)port\|yield\|de\%(fault\|lete\)\|void\|t\%(ypeof\|hrow\)\|new\|in\%(stanceof\)\=\)\>'
118-
\ : !search('\%([-=~!<*+,./?^%|&\[(]\|=\@<!>\)\_s*\%#','nbW') &&
119-
\ (search(s:expr_case . '\_s*\%#','nbW') || !search('[{:]\_s*\%#','bW') || s:IsBlock()))
118+
\ : !search('[-=~!<*+,./?^%|&\[(]\_s*\%#','nbW') && (search('>\_s*\%#','bW') ? search('=\%#','bW') ||
119+
\ synIDattr(synID(line('.'),col('.'),0),'name') =~? 'flownoise' :
120+
\ search(s:expr_case . '\_s*\%#','nbW') || !search('[{:]\_s*\%#','bW') || s:IsBlock()))
120121
endfunction
121122

122123
" Find line above 'lnum' that isn't empty, in a comment, or in a string.

0 commit comments

Comments
 (0)