web-mode icon indicating copy to clipboard operation
web-mode copied to clipboard

[Blade] No PHP blade block syntax highlight or indentation

Open PillFall opened this issue 4 years ago • 0 comments

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).

MRE screenshot

PillFall avatar May 31 '21 00:05 PillFall