0

noticed PhpStorm doesn't format code properly. I'm using standard Ctrl + Shift + L shortcut and it works because it pops out info that content is properly formatted.

PhpStorm

What's wrong? I'm using Material UI Theme. I've already tried to disable this plugin, no change.

enter image description here

5
  • Press the shortcut shown in that popup message and post what you see. Must be your settings (e.g. wrong scope or something) Commented Jun 17, 2021 at 9:10
  • I added an screenshot. Commented Jun 17, 2021 at 9:19
  • 1
    Works fine for me. 1) If you untick those 2 selected options -- will it work better? 2) Try restarting your IDE/maybe even the whole PC; 3) Install any plugin updates that are pending (especially if some outdated plugin is used). 4) Disable all custom (not bundled by default) plugins, restart IDE and try again. 5) Check idea.log (Help | Show Log in XXX) for possible hints Commented Jun 17, 2021 at 9:24
  • 1) No 2) done nothing changed 3) As a said custom Material Design in plugins other bundled plugins updated 4) done nothing changed 5) I can't see any related information in Log *.txt file. Commented Jun 17, 2021 at 9:35
  • I suggest you use "Help | Contact Support..."to contact PhpStorm support team. They would need to see the logs, your IDE version, installed plugins etc. My quick search did not product any recent tickets for 2021.1 version. All found tickets were about older versions: e.g. you need to invoke it 2 times in a row to have it working ... or it does nothing if "Optimize Imports" is enabled (which is disabled on your screenshot anyway) Commented Jun 17, 2021 at 10:03

2 Answers 2

1

Open File | Settings | Languages & Frameworks | Template Data Languages & remove any customizations from there. That's a PhpStorm bug: https://youtrack.jetbrains.com/issue/WI-42822 & https://youtrack.jetbrains.com/issue/WI-42135.

Sign up to request clarification or add additional context in comments.

Comments

0

Goto Settings > Editor > File types.

For PHP files (as an example), look for PHP in the left column (under Recognize File Types), verify you have *.php under the File name patterns column/box

That fixed it for me.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.