-
Notifications
You must be signed in to change notification settings - Fork 77
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
HTML Snippets not working in .php files #27
Comments
Nice one, I looking for this. Please support php file. |
Seems to have been removed in the last update, 14 days ago, when languages were removed from the package.json. A previous commit that had added the support for languages, including PHP, can be viewed here : I have tried re-adding these, but it does not seem to work properly, only works consistently in HTML. I am specifically looking for The author, @abusaidm, must have his reasons for doing this, but it would be wonderful if he could either revert back to language support, or perhaps explain how we can choose which languages the snippets will apply to, without remapping file extensions to the html document type, which loses all syntax completion / support for that language, as obviously it is now treated as simple HTML. |
hello all, sorry for the late reply. I have indeed removed the other languages, as other users have complained about the extension getting in the way while they program in other languages like php and js which makes sense. I was actually thinking that I should make a full extension that can be customised and add other features. Since VSCode has cleaned its act and started to handle extensions better than before, I think it is reasonable for individuals to customise individual extensions to meet their needs. Add a new language support to the extension:VSC Documentation
Example of languages: I hope you find this helpful. |
Thanks for the clear instructions... I have tried this, but as I mention above, it seems to only work reliably in html files. For example,in an html file, it is possible to create a body tag from a snippet, then a select box, option etc, correctly nested within each other. < body > In < body > < /body > Update: I see the same behaviour with other snippet extensions - for example React snippets are not displayed when within a < tag >, but are displayed anywhere else in the file if not contained in a < tag >, so perhaps this is a limitation of the language services for those languages? I will log an issue with the Vs Code team. |
A simple fix for this would be to go to the snippet's directory under
And locate |
(I have added them both combined and each one alone), and nothing happened when I press tab after Any idea how to fix it ? |
having the same problem |
Why don't you just create a custom setting for your extension for this, similar to the built-in emmet:
Seems kind of weird that someone would need to go in and hack your installed snippet files when you could just use an extension setting value instead. |
@Jakobud that worked perfect for me thank you very much.
|
I'm having same issue, Where do you put this code?
Thanks Tom |
@tommylux it goes in you User Settings (settings.json) |
Thanks.. figured it out. Was a little unsure of the syntax.
Still new to this editor, Think I will ditch the atom.io. |
any idea how to add it to razor files : *.cshtml ? |
Up! |
Thank you I finally got to make it work! |
I want to know about '.ejs extension'? |
i want work in cshtml file
but not work in cshtml file? |
Any idea how to support markdown files? |
What about Twig files ? |
@sined79 |
That works for me |
Thanks buddy, It worked for me. |
@Jakobud I added "erb": "html" to emmet's included languages and that worked perfectly. Thanks! |
|
HTML Snippets not working in .html files. |
Hello,
Great extension. However, the snippets aren't working correctly in .php files. I'd have to create a html file -> trigger the snippet inside .html file -> then will it work in .php files.
Once i restart VSCode, i need to repeat this.
Please address?
Thank you!
The text was updated successfully, but these errors were encountered: