Closed keithpitt closed 9 years ago
JSX highlighting should work fine when embedded in HTML files. I'm not sure if eruby has its own syntax highlighting, or if eruby files are just recognized as plain HTML and highlighted as such.
Also, the directory restructuring doesn't work; see the other pull request for why.
Perhaps the right solution here is to add a buffer-local variable which allows you to disable JSX highlighting completely—then you can add an ftdetect for eruby that short-circuits JSX highlighting. Alternatively, why not just set the global variable that requires the .jsx extension for the syntax file to be loaded? Do you use other extensions for your JSX files?
Closing; let me know if you would like the suggested support, or you can implement it in a separate PR.
I was having an issue where
vim-jsx
was interfering with myeruby
syntax highlighting (filename was index.html.erb). It would highlight<%= @usern.name %>
as JSX.I made a change so it will only attempt to highlight
js
files ifjsx
files have been disallowed.I also rearranged the file structure as per the other pull request, because that seemed to be having an effect on the problem as well.