Search
Learn
Share

Visual Studio Code: Set file association for one folder

Published by Profile Image LGK on 15 August, 2016
45 views
In my current project I have a "View" folder with PHP files in it. But the contents are actually just HTML markup. So I wanted to tell that Visual Studio, so I can get better intellisense results.

I you want to do the same, here is how it works:

  1. Go to the Workspace Settings (File » Preferences » Workspace Settings)
  2. Add the following option:
    "files.associations": {
"**/View/*.php": "html"
}

If you didn't have set settings before the settings.json file should like like this:
{
"files.associations": {
"**/View/*.php": "html"
}
}