In webstorm, jsx has all the same colors & stylings as javascript, which is great. However, the block comments don't adjust to jsx /* */
vs. {/* */}
.
I have tried removing *.jsx
as a registered javascript pattern in the File Types
preferences & making jsx its own file type, but then I lose all the custom colors & styling. Is there a way to adjust the block comment characters on a per-pattern basis while having the styling refer to the pure javascript rules?
Multi-line comments start with /* and end with */ . Any text between /* and */ will be ignored by JavaScript.
In WebStorm, you can comment and uncomment blocks of code with Cmd+Shift+/ on macOS and Ctrl+Shift+/ on Windows/Linux.
WebStorm provides code completion for React APIs and JSX in JavaScript code. Code completion works for React methods, React-specific attributes, HTML tags and component names, React events, component properties, and so on.
No. Please vote for WEB-16439 - a request for JSX comments support
There's a pretty convenient/hacky way to do that - add a live template to your Javascript group in Editor -> Live templates
with content like this:
{/*$SELECTION$*/}
then, in your code, select any react code, press ⌥⌘T
and type the first letter of your template's abbreviation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With