VS Code automatically does not define .blade.php
files. That is, I should manually switch the mode through the "Select Language Mode" button in the lower right corner or through hot keys (Ctrl + K + M) so that the file is identified as .blade.php
and then the code is highlighted.
Otherwise, the file is identified simply as .php
.
I have several extensions, including "Laravel Blade Snippets" and "Laravel Blade Spacer":
What needs to be done so that VS Code automatically recognizes .blade.php
files?
2
Answers
In file
settings.json
(to open it press Ctrl + Shift + P and type "Settings (JSON)") I added the line"*.blade.php": "blade"
in file association part.As a result (in my case):
Now files with extension
blade.php
are recognized and treated as Blade code.You may try the following extensions:
Laravel Extra Intellisense
Laravel intellisense
vscode-icons