-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
How do I make it so that emmet expands classNames in JSX and JS files using single quotes instead of double? #16354
Comments
I'm also not quite sure but I think I was able to do this in 1.7.0 but not with 1.7.1+ is this an issue or is it possible and there is just a setting that i'm missing? |
As a workaround, you can use:
As for the actual fix, I did a quick investigation. I think the root cause is that we do not support selecting the correct profile name. |
Ah yes, I've tried that however it breaks "className" expansion for jsx and replaces it with just "class" as it should be for html.
becomes
|
Any update on this guys? Also, is this an issue or just a missing feature? |
@kvoth3 We will look into this more in the current milestone |
@kvoth3 For now, can you try the below ?
@mrmlnc @sergeche http://docs.emmet.io/customization/syntax-profiles/#create-your-own-profile says that we can create our own profile. Meaning the below should work or have we misunderstood the docs?
|
cc @egamma |
@mrmlnc @sergeche If we update the
But, the documentation says that editors can return null (which is what we do as of now), and emmet would guess the best profile name based on the syntax and user data (which is passed via So why is that emmet is not able to guess the right profile name for |
@ramya-rao-a Thanks that's a great workaround for now! |
@mrmlnc @sergeche I tried the same setting as below in "jsx": {
"attr_quotes": "single"
} Which brings me to conclude that creating your own profile for syntax other than "html" and "xml" doesn't work unless the editor implements the |
@ramya-rao-a editor must properly detect profile name for current syntax. If it fails to do so (method not implemented, syntax is unknown etc.) it falls back to html profile |
@ramya-rao-a not that I’m working on a new Emmet implementation right now which will use different API and logic |
Thanks for confirming @sergeche! |
I've tried adding a custom syntaxprofile for jsx like so:
"emmet.syntaxProfiles": { "jsx": { "attr_quotes": "single" } }
This does not work. Emmet still expands classNames using double quotes.
Also, how to make using single quotes the default behavior for .js files and not just .jsx files?
The text was updated successfully, but these errors were encountered: