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

Mixing PHP + HTML + JS + CSS #128

Closed
VikramMaliEr opened this issue Jun 21, 2017 · 2 comments
Closed

Mixing PHP + HTML + JS + CSS #128

VikramMaliEr opened this issue Jun 21, 2017 · 2 comments

Comments

@VikramMaliEr
Copy link

Hi @felixfbecker ,
First of all you are doing great work One year back i was thinking VS code will be no use for me as PHP developer, (And no need of it for C# :D) But only as of your plugin it contribute great in my current project . But unfortunately we are still struggling with using php in html , js , css files. It will be great if you have plan to add this and this will be real big second milestone for Your plugin and VS code itself.
So

  1. do you have plan for making language server supporting for Mixed code as in open file it should support HTML intellisense in js tags it will support js intellisense and in "style" tag it will support css code intellisense and within any tag in php tag it will support php intellisense ?
  2. can i support your project by working in this direction ? I have no idea on how to creat plugin for VS code but i am master in php, html, js and c# i can work out for plugin in spare time.
  3. It will be great filling if i could work for this plugin
@felixfbecker
Copy link
Owner

Language servers are supposed to provide code intelligence for one language. So there is a language server for PHP, HTML, JS, CSS... Embedding or duplicating the language server code of HTML in the PHP language server would bring us down an endless path of embedded language servers. As you mentioned, inside HTML you can again embed JS. But inside JS you can also embed HTML in strings, just like you can embed SQL in PHP. It would be a violation of SoC to add all these to the PHP LS, instead we should find a solution that allows a language server to tell the client where embedded languages exist in the document and it can spawn other language servers for that.

This has been requested a lot of times already and I outlined ideas how this could work here:
microsoft/vscode#1751
microsoft/vscode#670 (comment)

@VikramMaliEr
Copy link
Author

VikramMaliEr commented Jun 23, 2017

Ahh got that, thank you , So far i got is it will be simple for vs code core developers to add php & html embedding same as js & html unless they are interested in php to. I see there are full of enhancements happening every few days to VS code. Worth to wait some time and watch what help full come out which will help to do this.
Also one point is PHP is supported in "< ?php ?>" tags but not in "< ?= ? >" wild card . it should be , don't you think ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants