To get similar suggestions and autocompletion features in VS Code for Laravel Blade files, you can use a combination of extensions and settings. Here’s a step-by-step guide to set it up:
-
Install the necessary extensions:
- Laravel Blade Snippets: This extension provides Blade syntax highlighting and snippets.
- Laravel Extra Intellisense: This extension offers additional IntelliSense for Laravel projects.
- PHP Intelephense: A powerful PHP language server that provides advanced features like autocompletion, go to definition, and more.
You can install these extensions from the VS Code marketplace. Simply search for them in the Extensions view (
Ctrl+Shift+X). -
Configure PHP Intelephense:
After installing PHP Intelephense, you might need to configure it to work well with Laravel. Add the following settings to your
settings.jsonfile:{ "intelephense.files.associations": [ "*.php", "*.phtml", "*.module", "*.inc", "*.blade.php" ], "intelephense.environment.includePaths": [ "vendor" ] } -
Enable Blade syntax highlighting and snippets:
The Laravel Blade Snippets extension should automatically provide syntax highlighting and snippets for Blade files. If it doesn’t, ensure that your Blade files have the
.blade.phpextension. -
Additional settings for better experience:
You can also add some additional settings to improve your development experience:
{ "editor.quickSuggestions": { "other": true, "comments": false, "strings": true }, "editor.suggestSelection": "first", "php.suggest.basic": false, "blade.format.enable": true, "blade.format.wrapLineLength": 120, "blade.format.wrapAttributes": "auto" } -
Restart VS Code:
After installing the extensions and updating the settings, restart VS Code to ensure all changes take effect.
By following these steps, you should be able to get similar suggestions and autocompletion features in VS Code for your Laravel Blade files, making your development experience closer to what you are used to in PHPStorm.
If you have any further questions or need additional help, feel free to ask!

