exexe
exexe

Reputation: 196

Formatting JavaScript code in blade files

For example I have code:

@section('js')
   var test = 0;
@endsection

@section('js_ok')
  <script>
     var test = 0;
  </script>
@endsection

example code

As you see on screenshot, for section js_ok everything is fine and PhpStorm know that this section is JavaScript language, but section js is treated like a normal text, not JavaScript (tabs, auto completion etc not working).

I need code like section js, so my question is: how to tell PhpStorm that section js is JavaScript language?

Upvotes: 0

Views: 882

Answers (1)

LazyOne
LazyOne

Reputation: 165138

Currently it's not possible with Blade files -- you cannot inject another language inside specific blade tag/block.

https://youtrack.jetbrains.com/issue/WI-29254 -- watch this ticket (star/vote/comment) to get notified on any progress.

Upvotes: 2

Related Questions