Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dan3460's avatar

VSC blade Snippets not recognizing blade.php

I have VSC installed at my home and work computer. Both installations are identical as far i can see. One of the extensions that i have in both is Laravel Blade Snippets by Winnie Lin. At my home computer when opening a Blade file it automatically recognizes a blade file. On my work computer i have to manually change in the bottom left corner from "html" to "Laravel Blade". I have google to exhaustion and haven't been able to get a solution. Is not crucial, is just annoying.

Thanks guys,

0 likes
4 replies
YeZawHein's avatar

@dan3460 Find your settings.json file in vscode and add this code

"blade.format.enable": true,
 "emmet.includeLanguages": {
        "blade": "html"
  },
    
dan3460's avatar

@yezawhein here is my settings.json, could be something there that is interfering with the autoselect lenguage?

 {
    "workbench.startupEditor": "newUntitledFile",
    "explorer.confirmDelete": false,
    "window.zoomLevel": -1,
    "git.enableSmartCommit": true,
    "cSpell.userWords": [
        "Khill",
        "Laravel",
        "accessorial",
        "describedby",
        "endauth",
        "endforeach",
        "endsection"
    ],
    "breadcrumbs.enabled": false,
    "terminal.integrated.shell.windows": "C:\Program Files\Git\bin\bash.exe",
    "explorer.confirmDragAndDrop": false,
    "workbench.iconTheme": "material-icon-theme",
    "files.associations": {
        "*.blade.php": "html",
        "*.tpl": "html",
        "*.php": "blade"
    },
    "[html]": {},
    "emmet.triggerExpansionOnTab": true,
    "blade.format.enable": true,
    "emmet.includeLanguages": {
        "blade" : "html"
    }
}
dan3460's avatar

Found my problem, in the file association section i had:

    "files.associations": {
        "*.blade.php": "html",
        "*.tpl": "html",
        "*.php": "blade"
    },

I replace it with:

    "files.associations": {
        "*.blade.php": "blade",
        "*.tpl": "html"
    },

Don't know if this is correct but now everything is working.

7 likes

Please or to participate in this conversation.