Closed ruyadorno closed 10 years ago
+1
:+1:
Sorry—will look at this later today!
I don't think the new React/JSX version requires the .jsx extension, so I'd rather not require it here, either. Also, I think the pragma detection is worth keeping around; it can already be configured with the g:jsx_pragma_required
variable. If it's all good with you, I'll push a similar commit with a g:jsx_ext_required
parameter to determine whether the extension is required. I'll default that to true, and default the pragma requirement to false.
@ruyadorno—Please let me know if the latest commit fails to address your needs.
@mxw I'm trying the latest commit from master but I'm getting the following errors:
Error detected while processing ~/.vim/bundle/vim-jsx/after/syntax/javascript.vim:
line 17:
E121: Undefined variable: b:jsx_ext_found
E15: Invalid expression: g:jsx_ext_required && !b:jsx_ext_found | finish | endif
@ruyadorno—Whoops, forgot to add something. Should be fixed with another pull.
:+1:
works like a charm now! thanks for the good work!
@mxw Thanks!
Disclaimer: I don't have any experience with vimscript.
This is a wild guess on how to implement the filetype recognition and drop the old jsx pragma support.
Feel free to accept/refuse as you will, or send some review if you think I'm close of getting it :)
:jack_o_lantern: Thanks!