Stop project view expanding to show all methods

When you open a file in PHPStorm, it expands in the project explorer to show all the methods in the file, and greyed out versions of the inherited methods. Is there a way I can stop this expansion by default, unless I click the arrow to expand?

ChatGPT said this, but it seems to be outdated?

To disable the expansion of files to show their methods by default, uncheck the option Autoscroll to Source and Autoscroll from Source. This will prevent PHPStorm from expanding files in the Project tool window when you open them.

1 comment
Comment actions Permalink

Hi there,

If you click on the "cog" icon (or right click on the Project View panel header) and then disabled "Tree Appearance | Show Members" option, it will disable showing the class structure there (which is useless there TBH, at very least in my usage case).

(BTW: AFAIK it auto-expands only if there is 1 class in a file; for 2+ classes it should not do that)

For the actual file structure -- use dedicated Structure tool window where you can configure certain aspects of what to be shown.

P.S. The aforementioned "Autoscroll to Source" and "Autoscroll from Source" option now have the following names:

 

0

Please sign in to leave a comment.