Skip to content
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

Consider emmet completions from php extension #29354

Closed
ramya-rao-a opened this issue Jun 23, 2017 · 17 comments
Closed

Consider emmet completions from php extension #29354

ramya-rao-a opened this issue Jun 23, 2017 · 17 comments
Assignees
Labels
emmet Emmet related issues feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code php PHP support issues

Comments

@ramya-rao-a
Copy link
Contributor

See #29318 and #28286 (comment)

@vscodebot vscodebot bot added bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues labels Jun 23, 2017
@ramya-rao-a ramya-rao-a added feature-request Request for new features or functionality php PHP support issues and removed bug Issue identified by VS Code Team member as probable bug labels Jun 23, 2017
@jens1o
Copy link
Contributor

jens1o commented Jul 28, 2017

Something new, would like to see it in action! :)

@ramya-rao-a
Copy link
Contributor Author

@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
Copy link
Contributor

jens1o commented Jul 29, 2017

What about websockets? For php I use this library: http://socketo.me/

@ramya-rao-a
Copy link
Contributor Author

I am not familiar with that, but you are welcome to give it a try :)

@ramya-rao-a ramya-rao-a added this to the Backlog milestone Jul 31, 2017
@roblourens
Copy link
Member

Spawning a node process from PHP is probably one solution. Making them talk to each other is easy, websockets not needed.

@ramya-rao-a ramya-rao-a changed the title Consider emmet completions from internal php extension Consider emmet completions from php extension Aug 10, 2017
@ramya-rao-a
Copy link
Contributor Author

cc @felixfbecker for this thoughts

@felixfbecker
Copy link
Contributor

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
Copy link

A little off topic but how do I turn emmet off? It's popping up everywhere and often the first selection in the list.
screenshot from 2017-08-16 12-11-03

@ramya-rao-a
Copy link
Contributor Author

@bmewburn set emmet.showExpandedAbbreviation to inMarkupAndStylesheetFilesOnly or never

However, 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.showExpandedAbbreviation back to always once 1.15.1 is released

@mcdado
Copy link

mcdado commented Dec 13, 2017

@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?

@ramya-rao-a
Copy link
Contributor Author

@mcdado To solve which problem? Please share screenshots

@mcdado
Copy link

mcdado commented 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:

screen shot 2017-12-13 at 20 59 22

This is without inMarkupAndStylesheetFilesOnly.

@bmewburn
Copy link

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.

@ramya-rao-a
Copy link
Contributor Author

@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

@bmewburn I did not know that, good to know! Can you point me to the code that does that?

@mcdado
Copy link

mcdado commented Dec 14, 2017

@bmewburn Indeed I'm using your awesome extension. I added again inMarkupAndStylesheetFilesOnly and it works great, indeed.

@roblourens roblourens added the *out-of-scope Posted issue is not in scope of VS Code label Sep 12, 2018
@vscodebot
Copy link

vscodebot bot commented 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!

@vscodebot vscodebot bot closed this as completed Sep 12, 2018
@roblourens roblourens removed this from the Backlog milestone Sep 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emmet Emmet related issues feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code php PHP support issues
Projects
None yet
Development

No branches or pull requests

6 participants