web-mode
web-mode copied to clipboard
[Blade] No PHP blade block syntax highlight or indentation
I can't get Emacs to highlight syntax using web-mode in blade with neither @php @endphp blocks or using <?php ?> blocks, and also can't get the inners to indent properly. There is a way to do this with web-mode?
MRE
In an Emacs buffer with web-mode and blade engine paste the following
@php
switch ($type) {
case 'Help':
$variant = 'info';
break;
case 'Text':
variant = 'success';
break;
}
@endphp
<?php
switch ($type) {
case 'Help':
$variant = 'info';
break;
case 'Text':
variant = 'success';
break;
}
?>
In neither case you get highlighting or indentation properly (in the image I do the indentation myself).
