Paul
Paul

Reputation: 158

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.

As you can see there is only support for 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.

Upvotes: 1

Views: 2162

Answers (1)

Tarun Lalwani
Tarun Lalwani

Reputation: 146490

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

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

Upvotes: 5

Related Questions