PHPStorm not formatting properly.....

I'm not sure what went wrong. PHPStorm was formatting things correctly (correctly for me is to NOT align the “=” - but I would accept aligning the “=" as it would look better than it does now.

Here is the project xml….


I can upload the .editorconfig  if needed.

 

0
3 comments

I went back to default and t looks better, but I'd like to understand how to align the assignment operators at least (a video lesson on formatting code would be nice).

0

Is there any guidance available on formatting? I've been trying to understand how to configure the formatting in Laravel blade files, with no luck so far. It seems entirely random.

0

Hi there,

I'm not sure what went wrong. PHPStorm was formatting things correctly (correctly for me is to NOT align the “=” - but I would accept aligning the “=" as it would look better than it does now.

The actual formatting seems OK TBH… Despite how it look son your first screenshot.

It seems to me that you are using non-proportional font (e.g. id occupies the same width as single M). Check your theme / Color Scheme settings ("Settings/Preferences | Editor | Font" and “Settings/Preferences | Editor | Color Scheme | Color Scheme Font”)

but I would accept aligning the “=" as it would look better than it does now

The aligning is done because of ALIGN_ASSIGNMENTS option set to true on your 2nd screenshot (the most likely reason IMO). The corresponding option in Settings is “Code Style | PHP | Wrapping and Braces | Assignment statement | Align consecutive assignments

 

Is there any guidance available on formatting? I've been trying to understand how to configure the formatting in Laravel blade files, with no luck so far. It seems entirely random.

It should be using HTML (or whatever outer language is in that block/section). Anyway, cannot comment much on this one – I format HTML only and very rarely use IDE formatting in Blade files (as it messes it up / not the way I prefer)

0

Please sign in to leave a comment.