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
Consider emmet completions from php extension #29354
*out-of-scopePosted issue is not in scope of VS CodeemmetEmmet related issuesfeature-requestRequest for new features or functionalityphpPHP support issues
roblourens and I discussed this and it looks tough at the moment.
The helper is node module and php language service I believe is in php.
How do we make them talk to each other?
I think this is the same issue as HTML suggestions inside PHP in general (or CSS in HTML, or JS in HTML, or SQL in PHP). Imo requiring the language server to handle all possible embedded languages (and the possibly embedded languages inside the embedded language and so on) doesn't scale, because for N language servers you will each have to build and integrate M<N embedded languages, which can then have embedded languages again, so in the worst case you have to embed close to N^N language servers. For example, PHP needs to embed HTML, but HTML then needs to embed CSS and JS. The user also can't decide anymore what language server to use for the embedded languages. Overall, we would end up with a very inconsistent experience across languages.
A better approach I think is what I outlined in this thread: #670 (comment)
In summary, let the language server declare ranges of embedded languages to the client and then let the client (VS Code) use the appropriate language server for that range+language.
Ramya Rao (@ramya-rao-a) I'm using 1.18.1 but I still need to set emmet.showExpandedAbbreviation to inMarkupAndStylesheetFilesOnly to solve this problem. Am I doing something wrong?
I admit that when I was figuring it out I thought it was happening exactly like here, with random keywords, but I now realize it is different, it happens with HTML keywords:
With the intelephense extension my preference is to set emmet.showExpandedAbbreviation to inMarkupAndStylesheetFilesOnly as the extension will forward requests on to other extensions listening to html when outside of <?php ?>, meaning you will get emmet suggestions in a more appropriate context.
David Gasperoni (@mcdado) Can't do much for cases like that other than setting emmet.showExpandedAbbreviation to inMarkupAndStylesheetFilesOnly and relying on using tab for emmet instead by setting emmet.triggerExpansionOnTab to true
Ben Mewburn (@bmewburn) I did not know that, good to know! Can you point me to the code that does that?
This iteration we focus on issue grooming. This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.
*out-of-scopePosted issue is not in scope of VS CodeemmetEmmet related issuesfeature-requestRequest for new features or functionalityphpPHP support issues
Activity
jens1o commentedon Jul 28, 2017
Something new, would like to see it in action! :)
ramya-rao-a commentedon Jul 28, 2017
roblourens and I discussed this and it looks tough at the moment.
The helper is node module and php language service I believe is in php.
How do we make them talk to each other?
jens1o commentedon Jul 29, 2017
What about websockets? For php I use this library: http://socketo.me/
ramya-rao-a commentedon Jul 31, 2017
I am not familiar with that, but you are welcome to give it a try :)
roblourens commentedon Jul 31, 2017
Spawning a node process from PHP is probably one solution. Making them talk to each other is easy, websockets not needed.
[-]Consider emmet completions from internal php extension[/-][+]Consider emmet completions from php extension[/+]ramya-rao-a commentedon Aug 10, 2017
cc Felix Becker (@felixfbecker) for this thoughts
felixfbecker commentedon Aug 10, 2017
I think this is the same issue as HTML suggestions inside PHP in general (or CSS in HTML, or JS in HTML, or SQL in PHP). Imo requiring the language server to handle all possible embedded languages (and the possibly embedded languages inside the embedded language and so on) doesn't scale, because for N language servers you will each have to build and integrate M<N embedded languages, which can then have embedded languages again, so in the worst case you have to embed close to N^N language servers. For example, PHP needs to embed HTML, but HTML then needs to embed CSS and JS. The user also can't decide anymore what language server to use for the embedded languages. Overall, we would end up with a very inconsistent experience across languages.
A better approach I think is what I outlined in this thread: #670 (comment)
In summary, let the language server declare ranges of embedded languages to the client and then let the client (VS Code) use the appropriate language server for that range+language.
bmewburn commentedon Aug 16, 2017
A little off topic but how do I turn emmet off? It's popping up everywhere and often the first selection in the list.

ramya-rao-a commentedon Aug 16, 2017
Ben Mewburn (@bmewburn) set
emmet.showExpandedAbbreviationtoinMarkupAndStylesheetFilesOnlyorneverHowever, we have refined the triggering of emmet suggestions in the latest Insiders (https://code.visualstudio.com/insiders). The same will be out in tomorrow's release of 1.15.1
So if you use emmet, I would suggest to set
emmet.showExpandedAbbreviationback toalwaysonce 1.15.1 is releasedmcdado commentedon Dec 13, 2017
Ramya Rao (@ramya-rao-a) I'm using 1.18.1 but I still need to set
emmet.showExpandedAbbreviationtoinMarkupAndStylesheetFilesOnlyto solve this problem. Am I doing something wrong?ramya-rao-a commentedon Dec 13, 2017
David Gasperoni (@mcdado) To solve which problem? Please share screenshots
mcdado commentedon Dec 13, 2017
I admit that when I was figuring it out I thought it was happening exactly like here, with random keywords, but I now realize it is different, it happens with HTML keywords:
This is without
inMarkupAndStylesheetFilesOnly.bmewburn commentedon Dec 13, 2017
With the intelephense extension my preference is to set
emmet.showExpandedAbbreviationtoinMarkupAndStylesheetFilesOnlyas the extension will forward requests on to other extensions listening tohtmlwhen outside of<?php ?>, meaning you will get emmet suggestions in a more appropriate context.ramya-rao-a commentedon Dec 13, 2017
David Gasperoni (@mcdado) Can't do much for cases like that other than setting
emmet.showExpandedAbbreviationtoinMarkupAndStylesheetFilesOnlyand relying on using tab for emmet instead by settingemmet.triggerExpansionOnTabtotrueBen Mewburn (@bmewburn) I did not know that, good to know! Can you point me to the code that does that?
bmewburn commentedon Dec 13, 2017
Ramya Rao (@ramya-rao-a) here you go https://github.com/bmewburn/vscode-intelephense/blob/master/client/src/embeddedContentDocuments.ts 😄
mcdado commentedon Dec 14, 2017
Ben Mewburn (@bmewburn) Indeed I'm using your awesome extension. I added again
inMarkupAndStylesheetFilesOnlyand it works great, indeed.vscodebot commentedon Sep 12, 2018
This iteration we focus on issue grooming. This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.
If you wonder what we are up to, please see our roadmap and issue reporting guidelines.
Thanks for your understanding and happy coding!