Skip to content
Advertisement

Laravel blade prettier formatting but removed the syntax highlighting and snippets

I added *.blade.php as html in the files.associations to have prettier format for my blade.php files but this results to remove the snippets and highlighting needed in the blade.php files. I’m using Prettier for my formatting and Laravel Blade Snippets for my highlighting and snippets. Is there any other way to format blade files as html but keep the snippets and highlighting?

With *.blade.php in files.associations enter image description here

without *.blade.php in files.associations enter image description here

Advertisement

Answer

I had the same issue. The only thing that works for me was:

  • Install this extension: Laravel Blade

  • Add in settings.json

      "[blade]": {
        "editor.defaultFormatter": "amirmarmul.laravel-blade-vscode",
        "editor.formatOnSave": true
      }
    
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement