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 too active in files such as JSX, TSX, and PHP #51537
Fixing this would require us to parse the file and figure out if the current position is js or html which we cannot do at the moment. Keeping this issue open to track all further issues around emmet and js.
Until then, I would suggest to set emmet.showExpandedAbbreviation to inMarkupAndStylesheetFilesOnly when you are doing purely js work. This will disable emmet completions in jsx files while still retaining it for html and css files. When you want to use emmet in jsx file, change the same setting back to always
changed the title [-]Emmet is the top suggestion when typing a variable inside brackets in JS[/-][+]Emmet is the top suggestion when typing javascript code[/+]on Nov 19, 2018
Raymond Zhao (@rzhao271) I don't mind that Emmet suggests. It's just that it's always above the TypeScript suggestions, and I often pick it on Enter. Can we do something about that?
Until then, I would suggest to set emmet.showExpandedAbbreviation to inMarkupAndStylesheetFilesOnly when you are doing purely js work.
Pair that setting together with emmet.triggerExpansionOnTab to true and you can tab once to complete whatever autocomplete is suggesting, and tab again to expand the emmet abbreviation for jsx files. This is the behavior I personally was looking for.
Activity
ramya-rao-a commentedon Nov 19, 2018
Fixing this would require us to parse the file and figure out if the current position is js or html which we cannot do at the moment. Keeping this issue open to track all further issues around emmet and js.
Until then, I would suggest to set
emmet.showExpandedAbbreviationtoinMarkupAndStylesheetFilesOnlywhen you are doing purely js work. This will disable emmet completions in jsx files while still retaining it for html and css files. When you want to use emmet in jsx file, change the same setting back toalways[-]Emmet is the top suggestion when typing a variable inside brackets in JS[/-][+]Emmet is the top suggestion when typing javascript code[/+][-]Emmet is the top suggestion when typing javascript code[/-][+]Emmet too active in javascriptreact files[/+]joaomoreno commentedon Nov 25, 2020
Raymond Zhao (@rzhao271) I don't mind that Emmet suggests. It's just that it's always above the TypeScript suggestions, and I often pick it on Enter. Can we do something about that?
Fosol commentedon Dec 27, 2021
I can't get my styled components to work because of this bug. But the workaround doesn't work either.
1 remaining item
didii commentedon Mar 4, 2022
Pair that setting together with
emmet.triggerExpansionOnTabtotrueand you can tab once to complete whatever autocomplete is suggesting, and tab again to expand the emmet abbreviation for jsx files. This is the behavior I personally was looking for.rzhao271 commentedon Apr 4, 2022
I'm merging the original issue with #138461.
For the styled-components issue, I'll track it in #142302.
rzhao271 commentedon Jul 27, 2022
Reopening this issue as a catch-all.
[-]Emmet too active in javascriptreact files[/-][+]Emmet too active in files such as JSX, TSX, and PHP [/+]