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
Option to show emmet suggestions in languages that are not pure mark up or stylesheet like #29532
We decided to disable the emmet abbreviations in the suggestion list in languages that are not pure mark up or stylesheet like. The reason was that there was no easy way for the emmet extension to understand the underlying language and identify the areas of the code where it should suggest emmet.
For example, in case of javascriptreact/typescriptreact, the emmet suggestions would show up no matter where (js vs html) you were typing. This got very noisy because in a jsx file you are most of the time writing js.
So, now this issue becomes an extension candidate.
Note that the command Emmet: Expand Abbreviation and Emmet: Wrap with Abbreviation will continue to work in jsx/tsx files. Bind a keyboard shortcut for Emmet: Expand Abbreviation (other than tab) and you will be able to expand emmet abbreviations anywhere in jsx file
changed the title [-]emmet expansion not working in jsx files (javascriptreact)[/-][+]emmet expansion suggestions should show up in jsx files (javascriptreact)[/+]on Jun 27, 2017
Ok, I understand your point. Is there maybe a chance to add an entry in the settings to change this, so to enable the emmet abbreviations in certain languages?
Thomas Klepzig (@tklepzig) If there would be such a setting, are you saying you wouldnt mind the emmet suggestions showing up when you are writing javascript code in javascriptreact file?
Can't speak for Thomas Klepzig (@tklepzig), but I would certainly love the choice to press Tab to expand an Emmet snippet. That is more important than showing the suggestions, for me.
Thomas Klepzig (@tklepzig) I agree, but can't come up with a nice name for that. Trust me I have tried 😭 If you have any ideas, am open to suggestions.
Ramya Rao (@ramya-rao-a) Hm, what do think about something like defaultAndIncludedLanguages (could be improved, only an idea ;) ) and add javascriptreact and typescriptreact as default to includeLanguages?
Yeah, you are right, I forgot that it's a map, not just a list.
So maybe just leave it to the user? In the way, that defaultAndIncludedLanguages doesn't add anything unless includeLanguages is modified (including javascriptreact and typescriptreact)?
Activity
geirsagberg commentedon Jun 27, 2017
Also affects .tsx / Typescript React.
ramya-rao-a commentedon Jun 27, 2017
We decided to disable the emmet abbreviations in the suggestion list in languages that are not pure mark up or stylesheet like. The reason was that there was no easy way for the emmet extension to understand the underlying language and identify the areas of the code where it should suggest emmet.
For example, in case of javascriptreact/typescriptreact, the emmet suggestions would show up no matter where (js vs html) you were typing. This got very noisy because in a jsx file you are most of the time writing js.
The solution we are aiming for is this:
So, now this issue becomes an extension candidate.
Note that the command
Emmet: Expand AbbreviationandEmmet: Wrap with Abbreviationwill continue to work in jsx/tsx files. Bind a keyboard shortcut forEmmet: Expand Abbreviation(other than tab) and you will be able to expand emmet abbreviations anywhere in jsx file[-]emmet expansion not working in jsx files (javascriptreact)[/-][+]emmet expansion suggestions should show up in jsx files (javascriptreact)[/+]tklepzig commentedon Jun 27, 2017
Ok, I understand your point. Is there maybe a chance to add an entry in the settings to change this, so to enable the emmet abbreviations in certain languages?
ramya-rao-a commentedon Jun 27, 2017
Thomas Klepzig (@tklepzig) If there would be such a setting, are you saying you wouldnt mind the emmet suggestions showing up when you are writing javascript code in javascriptreact file?
geirsagberg commentedon Jun 27, 2017
Can't speak for Thomas Klepzig (@tklepzig), but I would certainly love the choice to press Tab to expand an Emmet snippet. That is more important than showing the suggestions, for me.
tklepzig commentedon Jun 27, 2017
Yeah, I wouldn't mind if the emmet suggestions would show up in the whole jsx file.
ramya-rao-a commentedon Jun 27, 2017
Geir Sagberg (@geirsagberg) We are definitely moving away from binding Tab to Emmet. See https://code.visualstudio.com/updates/v1_13#_emmet-abbreviation-expansion-in-suggestion-list for more on this.
You can still bind any other keyboard shortcut to
Emmet: Expand Abbreviationcommand to get emmet expansions anywhere in the jsx fileThomas Klepzig (@tklepzig) I'll keep that in mind and look into options
21 remaining items
ramya-rao-a commentedon Jun 29, 2017
Thomas Klepzig (@tklepzig) I agree, but can't come up with a nice name for that. Trust me I have tried 😭 If you have any ideas, am open to suggestions.
Jens Hausdorf (@jens1o) #27784 is about expansion not working at all when there is a grouping followed by multiplication. What Nana Asumadu (@nanaasumadu) is saying is that the suggestions stop showing when you hit *.
That is related to #29758
Nana Asumadu (@nanaasumadu) Until #29758 is completely fixed, as a work around you can still press Ctrl+Space and manually trigger the suggestion
ramya-rao-a commentedon Jun 29, 2017
Thanks for testing everyone!
tklepzig commentedon Jun 29, 2017
Ramya Rao (@ramya-rao-a) Hm, what do think about something like
defaultAndIncludedLanguages(could be improved, only an idea ;) ) and addjavascriptreactandtypescriptreactas default toincludeLanguages?ramya-rao-a commentedon Jun 29, 2017
Adding add javascriptreact and typescriptreact as default to includeLanguages doesn't make sense
includeLanguagesis to map a non supported language to a supported languagelike
javascript: javascriptreacttklepzig commentedon Jun 29, 2017
Yeah, you are right, I forgot that it's a map, not just a list.
So maybe just leave it to the user? In the way, that
defaultAndIncludedLanguagesdoesn't add anything unlessincludeLanguagesis modified (includingjavascriptreactandtypescriptreact)?ramya-rao-a commentedon Jun 29, 2017
I didnt want to include any references to the "includeLanguages" setting. Not many people would be aware of what that means.
One option I was toying around was "never", "always" and "inHtmlAndCssOnly"
tklepzig commentedon Jun 30, 2017
Ok, I see your point.
Yeah, that sounds good, so all "combined" languages are excluded. Definitely a better name then the current one.
ramya-rao-a commentedon Jun 30, 2017
ya but the problem is languages like jade, haml, xml also should be included
so more like "never", "always" and "inMarkupAndCssOnly"?
tklepzig commentedon Jun 30, 2017
Yep, "Markup" sounds good. Should be clear enough which languages are included.
ramya-rao-a commentedon Jun 30, 2017
Done.
See 158270d
tklepzig commentedon Jun 30, 2017
Thx :)