File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ if g:jsx_pragma_required
2323 let b: jsx_pragma_found = search (s: jsx_pragma_pattern , ' npw' )
2424endif
2525
26- " if g:jsx_prevalent_declaration == 1
26+ " if g:jsx_check_react_import == 1
2727" parse the first line of js file (skipping comments). When it has a 'react'
2828" importation, we guess the user writes jsx
2929" endif
@@ -34,7 +34,7 @@ let s:jsx_prevalent_pattern =
3434fu ! <SID> EnableJSX ()
3535 if g: jsx_pragma_required && ! b: jsx_pragma_found | return 0 | endif
3636 if g: jsx_ext_required && ! exists (' b:jsx_ext_found' ) &&
37- \ ! (get (g: ,' jsx_prevalent_declaration ' ) && search (s: jsx_prevalent_pattern , ' nw' ))
37+ \ ! (get (g: ,' jsx_check_react_import ' ) && search (s: jsx_prevalent_pattern , ' nw' ))
3838 return 0
3939 endif
4040 return 1
4343autocmd BufNewFile ,BufRead *.jsx let b: jsx_ext_found = 1
4444autocmd BufNewFile ,BufRead *.jsx set filetype = javascript.jsx
4545autocmd BufNewFile ,BufRead *.js
46- \ if <SID> EnableJSX () | set filetype = javascript.jsx | endif
46+ \ if <SID> EnableJSX () | set filetype = javascript.jsx | endif
You can’t perform that action at this time.
0 commit comments