简体   繁体   中英

VS code Intellisense support in PHTML-files for inline css / inline javascript

I am using Visual Studio Code since a few days and I was wondering if it is possible to have support for Intellisense inside inlined css-blocks and/or inlined javascript in ' .phtml '-files.

如您所见,仅支持php

I could not find a solution online only a few people complaining about this not working from a few months back but I nothing that worked for me.
It would really help me a lot if someone has any idea how to solve this or at least a step in the right direction, or if I have to move the css and js into external files (of course thats better(!) but thats not the point here )

Thanks in advance.

This works for me after 2 changes in vscode .

User settings

I added below to the user settings

"files.associations": {
        "*.phtml": "php"
    },

Extension

Installing the intelliphense extension

延期

And now both php as well as css intellisense works

的PHP

的CSS

Make sure you have no other conflicting extension enabled which may cause issue.

Also do have a look at the below open thread

https://github.com/Microsoft/vscode/issues/670

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM