dkBITS's avatar
Level 13

phpStorm Markdown Auto Formatting in blade.php Problem

Does anyone have an idea how to set phpStorm so that when editing markdown mailables in Laravel in a blade.php file, the indentation for is not always done automatically? For all other blade files, of course, this should be so. But this often leads to erroneous displays if you don't pay attention to it every time. How do you do it otherwise?

0 likes
5 replies
bugsysha's avatar

I usually create a markdown file and put everything there, then from mailable class I do file_get_contents. Far cleaner in my mind.

abms1's avatar

Just go settings > Editor > Code Style. Choose Formatter tab, and add a path to DO NOT FORMAT field. For example, I added this : resources/views/emails/*

8 likes
andcl85's avatar

And what if you have Pint installed and running. PhpStorm then says that "Settings may be overridden by PHP external formatter"... Anyone in this situation?

sebastiansulinski's avatar

What I did was to use the following, which have worked and now any files within these directories remain untouched by formatter on save:

resources/views/mail/**/*;resources/views/vendor/**/*

Please or to participate in this conversation.