-
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
Option to show emmet suggestions in languages that are not pure mark up or stylesheet like #29532
Comments
Also affects .tsx / Typescript React. |
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 |
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? |
@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 @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. |
Yeah, I wouldn't mind if the emmet suggestions would show up in the whole jsx file. |
@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 @tklepzig I'll keep that in mind and look into options |
I have updated this issue title to track the option to allow suggestions to show up in non markup like languages like jsx |
@ramya-rao-a
"Emmet: Expand Abbrevation", however works. |
@ramya-rao-a I can see that you have made a new commit to address this issue. I will test when the new build of insiders comes out this evening my time. |
The setting
This change will be out in the next Insiders build (29th June, 2017) Give it a try and let me know how it works out |
@nanaasumadu Yes, please wait for the next Insider's build. :) |
Thanks @ramya-rao-a! I will try this today with the new insiders (it's currently morning for me ;) ) |
I'm going to try it out too. :) |
@ramya-rao-a Thanks. With the setting below, emmet suggestions are working in PHP
|
Yep, also working for me. |
I think I have discovered a bug. Emmet suggestions fails when there is Try this in both PHP and HTML "Emmet: Expand Abbreviation" command, however, works. |
@ramya-rao-a Yeah, it's working as expected, with I would only suggest to change the |
@nanaasumadu No, you didn't. It's already reported: #27784 |
@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. @jens1o #27784 is about expansion not working at all when there is a grouping followed by multiplication. What @nanaasumadu is saying is that the suggestions stop showing when you hit *. @nanaasumadu Until #29758 is completely fixed, as a work around you can still press Ctrl+Space and manually trigger the suggestion |
Thanks for testing everyone! |
@ramya-rao-a Hm, what do think about something like |
Adding add javascriptreact and typescriptreact as default to includeLanguages doesn't make sense
like |
Yeah, you are right, I forgot that it's a map, not just a list. |
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" |
Ok, I see your point. |
ya but the problem is languages like jade, haml, xml also should be included so more like "never", "always" and "inMarkupAndCssOnly"? |
Yep, "Markup" sounds good. Should be clear enough which languages are included. |
Done. See 158270d |
Thx :) |
Steps to Reproduce:
javascriptreact
.div
and trigger suggestion list.Expected: The suggestion list contains the "expand emmet abbreviation" for the
div
tag.Actual: The suggestion list contains no emmet entry at all.
The text was updated successfully, but these errors were encountered: