phptools-docs icon indicating copy to clipboard operation
phptools-docs copied to clipboard

Disabling format in file?

Open xSirLalo opened this issue 2 months ago • 0 comments

Is there a way to ignore a block of code that I don't format, as the Laravel Blade formatter extension does?

For example:

Disabling format in file To disable formatting in your file, you can use blade comments in the following format:

{{-- blade-formatter-disable --}} {{ $foo }} {{ $bar }} {{-- blade-formatter-enable --}}

To disable formatting on a specific line, you can use comment in the following format:

{{-- blade-formatter-disable-next-line --}} {{ $foo }}

To disable formatting for an entire file, put a {{-- blade-formatter-disable --}} comment at the beginning of the file:

{{-- blade-formatter-disable --}}

{{ $foo }}

No Format Image

Formant Image

Thanks.

xSirLalo avatar Sep 11 '25 23:09 xSirLalo