-
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
Emmet suggestions are expanding even while writing Javascript in JSX documents #29185
Comments
This behavior is also present in 1.13.1. "Expand Emmet Abbreviation" seems to always be the default action in code completion when writing JSX. |
This seems to affect only when This must be hard to fix, how would it know it's not a good choice? Maybe enable the new emmet suggestion only inside specific areas, like when already inside the JSX tags. P.S. I turned the newEmmet off because of this. |
The problem is that there is no nice way at the moment for an extension to figure out embedded languages I have removed the emmet auto complete for jsx files for now. The command You can still get auto completions for emmet everywhere in jsx files by setting the below. Though you will end up getting
For the ideal solution, I am working on pulling the emmet completion provider into a separate module and have language specific extensions use it by passing the right language. That work is being tracked here #29114 In that model, a React extension can register a completion provider that uses emmet completion provider and provide completions only when inside the tags in a jsx file. |
@ramya-rao-a also, I wanted to point out that the this setting is not working - I'm still getting the emmet suggestions in the JSX files.
|
@kumarharsh Good catch on the In your screenshot above, is that a jsx file or javascript file? |
Please read #28286 (comment) |
@kumarharsh you can use the |
Actually, here is the best course of action
|
Note to verifier:
|
In VS Code 1.15, emmet suggestions will show up in jsx files. If you do find it noisy, set |
@ramya-rao-a Thank you so much. |
Do you have a question? Please ask it on Stack Overflow with
vscode
tag(Use Help > Report Issues to prefill these)
Steps to Reproduce:
javascriptreact
document, emmet is inserting it's suggestions into the intellisense suggestions (such asforEach
), and pressing tag creates JSX elements.The text was updated successfully, but these errors were encountered: