You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Emmet suggestions are expanding even while writing Javascript in JSX documents #29185
While writing JS code in a javascriptreact document, emmet is inserting it's suggestions into the intellisense suggestions (such as forEach), and pressing tag creates JSX elements.
Reacted by Frédérick Morin, Munif Tanjim and Jari Pennanen
This seems to affect only when "emmet.useNewEmmet": true in the settings. I actually like the new emmet though.
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.
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.
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.
Actually, is there a way to disable emmet altogether? It's not letting me write any code - sometimes it overrides all intellisense, meaning I don't get ANY suggestions. And as said, the setting above doesn't seem to be working.
Assign a keyboard short cut (other than tab) for Emmet: Expand Abbreviation and use that when you want to use Emmet expansions on given abbreviation
If you are on stable (1.13.0 or 1.13.1) set "emmet.showAbbreviationSuggestions": false, "emmet.showExpandedAbbreviation": false to stop the emmet suggestions from showing up if you are mainly a jsx dev
If you have emmet.useNewEmmet set to false and are on Insiders, you are missing out on cool new features like multi cursor support for all Emmet Actions, emmet abbreviation suggestions in auto-complete for markup and css like languages
Activity
freddydumont commentedon Jun 21, 2017
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.
Ciantic commentedon Jun 21, 2017
This seems to affect only when
"emmet.useNewEmmet": truein the settings. I actually like the new emmet though.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.
ramya-rao-a commentedon Jun 22, 2017
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
Emmet: Expand Abbreviationwill still work. So feel free to use this command or bind a keyboard shortcut (not Tab)You can still get auto completions for emmet everywhere in jsx files by setting the below. Though you will end up getting
classinstead ofclassNameFor 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.
kumarharsh commentedon Jun 22, 2017
Ramya Rao (@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 commentedon Jun 22, 2017
Actually, is there a way to disable emmet altogether? It's not letting me write any code - sometimes it overrides all intellisense, meaning I don't get ANY suggestions. And as said, the setting above doesn't seem to be working.
ramya-rao-a commentedon Jun 22, 2017
Kumar Harsh (@kumarharsh) Good catch on the
emmet.excludedLanguagessetting. Fixed with 9483e9fThe fix will be out in tomorrow's Insiders build
In your screenshot above, is that a jsx file or javascript file?
If it is a jsx file, then from today's Insiders you won't see it anymore.
ramya-rao-a commentedon Jun 23, 2017
Please read #28286 (comment)
Ciantic commentedon Jun 25, 2017
Kumar Harsh (@kumarharsh) you can use the
"emmet.useNewEmmet": falseuntil this has been solved somehow adequately.ramya-rao-a commentedon Jun 25, 2017
Actually, here is the best course of action
emmet.useNewEmmetset totrueEmmet: Expand Abbreviationand use that when you want to use Emmet expansions on given abbreviation"emmet.showAbbreviationSuggestions": false, "emmet.showExpandedAbbreviation": falseto stop the emmet suggestions from showing up if you are mainly a jsx devemmet.useNewEmmetset tofalseand are on Insiders, you are missing out on cool new features like multi cursor support for all Emmet Actions, emmet abbreviation suggestions in auto-complete for markup and css like languagesramya-rao-a commentedon Jun 26, 2017
Note to verifier:
emmet.useNewEmmettotrueEmmet: Expand Abbreviationto expand abbreviations in jsx filesramya-rao-a commentedon Aug 10, 2017
In VS Code 1.15, emmet suggestions will show up in jsx files.
The noise has been greatly reduced and so will not be an annoyance as before.
If you do find it noisy, set
"emmet.showExpandedAbbreviation": "inMarkupAndStylesheetFilesOnly"lawrencekgrant commentedon Aug 14, 2017
Ramya Rao (@ramya-rao-a) Thank you so much.
Remove emmet autocomplete for jsx Fixes microsoft#29185