-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Enable the use of the new emmet feature in vscode 1.13 #232
Comments
I'm interested in doing that too. @ramya-rao-a Wondering if I need to extract Previously this worked fine: "emmet.syntaxProfiles": {
"vue": "html",
"vue-html": "html"
} |
@ramya-rao-a NVM didn't see it on the May iteration issue, but saw on microsoft/vscode#27697. To all others: syntax profile seem to be on the agenda for VSCode June release. |
Yes, actually supporting |
If you get it before 22nd I can demo its awesomeness at VueConf 😉 |
haha, sure I'll try |
@octref I just pushed in the changes required to support this. It didn't make it to Tuesday's Insiders build though. Can you test from master and see if it works as expected for you? I need a second pair of eyes for testing :) |
Closing since this will be available in VSCode's June release. |
I'll just report issues here instead of opening new ones at VSCode. |
Logged microsoft/vscode#29114 |
Reopen to keep track of integrating https://www.npmjs.com/package/vscode-emmet-helper |
@ramya-rao-a |
@octref Good point. I am out for the week at a conference, won't have time to make the change. |
@octref I have updated the helper. Language servers can now call
Can you give it a try? |
Thanks a lot. Just landed in China from Warsaw -- I'll give it a try soon. |
@octref On second thoughts, it would be much better if we include this completion provider in html and css language service. That way vue and other languages that already have html/css completions using the built-in html/css extensions get it for free. Let me know if you want to collaborate on that |
I'd want to collaborate on that. But OTOH our plan is to rewrite / extend on the html LS for supporting Vue's js-in-template like Believe that's the same case for ember / angular templates, so I don't know if it's worth it. It's just China internet gives me a hard time + I'm busy traveling...I'll give it a shot tonight. |
I found this works. "emmet.includeLanguages": {
"vue": "html",
"vue-html": "html"
} Strangely, style tag in vue file doesn't have emmet completion as that in html file. @ramya-rao-a Would you like kindly tell us something about embedded language support in emmet2? |
@octref What happens when users have mapped |
That works partially. |
I get that, I am wondering if they will get double suggestions in the |
Just tested microsoft/vscode#22585 (comment), for
|
With a fresh install of everything from yesterday, the following seems to be working without double suggestions: "emmet.includeLanguages": {
"vue": "html"
} The caveat being that emmet suggestions also show up in |
@yyx990803 Got u sir. 0.9.4 should work with html/css/scss/less/stylus, without |
Just tested and it works perfectly now (without any emmet settings)! 💯 |
It now works for me too in Vue template, however I can only seem to complete valid HTML5 elements - custom element names do not get completed, eg: |
@wernerm That is intentional. Emmet has no way of differentiation custom element names from text that are not meant to be abbreviations. We needed to avoid suggesting every word ever typed as a tag. So we maintain a white list for commonly used HTML5 elements (So Keep in mind To expand just the custom element, use |
@ramya-rao-a Thanks for the information. Since custom element names are quite common in Vue it would be nice if we could somehow add to the white-list of element names. (One of the main purposes of Emmet is to save keystrokes after all.) |
You can add it to your custom snippets. See Custom Snippets in Emmet on how to have custom snippets in Emmet. In your case it would look like
Which feels a little silly actually.... Or we could have a new setting |
@ramya-rao-a Thanks. Having a setting available would be a nice way to address the issue. |
It might be ideal for various contexts to customize emmet expansion by language setting to either utilize a whitelist of tag names or enable some kind of tag regex. In the vue context, custom tags almost contain a namespace prefix, so it could be something like |
@alexsasharegan Can you try the latest Insiders? You can get it from https://code.visualstudio.com/insiders There I have enabled emmet suggestions for tag completion when the tag contains a single |
@alexsasharegan added support for tags with multiple Tomorrow's Insiders will have the fix |
I'll give it a whirl tomorrow. Thank you! |
@alexsasharegan The vetur extension will need to use the latest version(1.0.22) for the emmet helper though. |
Thank @ramya-rao-a for continuous support! |
@yyx990803 Thanks!!! That solved my TAB problem with those last versions! |
Greetings! I know this is an old topic, but I would like to know if there is a way that this behavior can be used for components that have neither
More info here |
With the new emmet configured I lose the feature completley in template sections in .vue files. It would be super awesome to get this back!
Link to the new feature in the update post:
https://code.visualstudio.com/updates/v1_13#_emmet-abbreviation-expansion-in-suggestion-list
The text was updated successfully, but these errors were encountered: