-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CLOSED] Syntax highlighting for babel (React) #10492
Comments
Comment by petetnt This requires a CodeMirror update (which is tracking at adobe/brackets#12177) that contains proper syntax highlighting for Otherwise 👍 |
Comment by Sophia-Gold Hi. What's the progress on it? According to the linked thread, the CodeMirror update was merged with master over a month ago. However, I cloned the master and it's still not highlighting babel syntax... |
Comment by MiguelCastillo I am a bit unclear as to what "highlighting for babel" means. But we merged JSX syntax highlighting today. |
Comment by Sophia-Gold Well when I'm using react I usually use script type "text/babel" although "text/jsx" is fine too. However, I just cloned the master right before updating this thread and JSX is not highlighting either. I'm also not sure whether to open an issue about multibrowser errors, since a search shows tons of open issues with that from quite a while ago. All I could add is that it works with the getting started project and nothing else. |
Comment by pranaygp I'll try to look into it over the next few days if I can. Will keep you posted. |
Comment by Sophia-Gold Thanks! For reference, I cloned the master repo just right before commenting here. As for multibrowser...I don't want to derail this thread, but it also doesn't seem worth opening a new issue since everyone seems to have given up on it working correctly. Is that perception accurate? I already have multibrowser set to my default so it works with things like Sublime Text, it's just that Brackets defaults to chrome for Live Preview. So at the moment I can either choose an editor that allows me to test in multiple browsers or one that allows live previewing. |
Comment by Sophia-Gold From what I could glean from #12422, JSX and Babel highlighting seems to require some preference changes in the current master, but I don't see any preferences that correspond to that. Then the branch in that request updated them in two attributes files so you can just specify them using |
Comment by ficristo Hi <script type="text/babel">
ReactDOM.render(
<h1>Hello, world!</h1>,
document.getElementById('example')
);
</script> |
Comment by Sophia-Gold I have it exactly like that. To be clear, the syntax highlighting should be the sam as with "text/javascript" not as it appears in your snippet above right? Also, when was this feature merged with the master? I see issue thread requests with people saying it's working at various points and then someone else saying they need to update something so it's rather confusing. One person says it was in the master two days ago, one earlier today, etc. If I were to clone the master right now, shift+click on my stable build, then select /src/index.html it should highlight "text/babel" and "text/jsx"? |
Comment by ficristo This is how should appear with the PR: |
Comment by Sophia-Gold Ah! Ok, thank you. Really. Am I going nuts or have I seen multiple threads saying this was merrged with the master by now? Like the comment above by Now if I can just figure out what's going on with the multibrowser bugs.. I'm not in a position to complain, but just shocked to see this level of confusion in a project backed by a company the size of Adobe. The JSLint parameter names are funny, though. Evil == eval(). |
Comment by petetnt
See |
Comment by Sophia-Gold Got it. Thank you! |
Comment by MiguelCastillo Ok - we should be good with mixed mode now. Thank you everyone! |
Comment by Sophia-Gold Looks great! Sorry, but really amateur question here...how do I change the default path for the Brackets package to the new directory I've cloned so I don't have to shift-click every time? Seems it should be in one of the json files in /Library/Application Support/Brackets/, but don't see any parameters there with that file path. |
Comment by petetnt
|
Comment by Sophia-Gold Thanks! Even figured out the multibrowser issue. You just need to open the entire project folder in Brackets instead of just the index.html file. |
Issue by pranaygp
Thursday Feb 11, 2016 at 20:19 GMT
Originally opened as adobe/brackets#12208
Similar to issue #10166, but for React
Hey,
Could we please have JS syntax highlighting enabled for script tags that have type "text/babel" (and "text/jsx") ?
Cheers
The text was updated successfully, but these errors were encountered: