Anil
Anil

Reputation: 21910

PhpStorm light yellow highlight in file explorer / project window, what is it and how can I change the color?

I just started using PhpStorm, and I've noticed when I look into my vendor directory (managed by Composer), I see the background colour is a light yellow and unreadable with my current theme. It like this in all the directories within the vendor folder.

What does it mean? How can I change the background color?

light yellow background in project window composer vendor

Upvotes: 18

Views: 14228

Answers (4)

slp
slp

Reputation: 441

I ended up here because this page was listed as one of the first search results regarding this issue.

I had this problem myself after renaming my project and restarting PhpStorm. All project files were highlighted in yellow.

The .idea/modules.xml was a good starting point. The file paths were messed up. I then realized that a slash in the project name was responsible. There is also a current ticket in the bug tracker.

The solution for me was to manually add the project directory again under Settings -> Directories.

Upvotes: 4

Erenor Paz
Erenor Paz

Reputation: 3181

A super late answer, because I faced the very same problem right now, in the hope that future readers would be helped: if all the files in your project have a yellow background, it could mean that phpstorm couldn't find the right configuration for the project (it happened to me after changing the project's name). In this case, you can open the file .idea/modules.xml and look at the "fileurl" and "filepath" attributes. there should be two paths pointing to a ".iml" file: if these two paths are different from the one found in the .idea directory, you can change their name to match the "real" IML file, or change that IML file to match the name found in the path. Making them coherent solves the issue of "oh, gosh, all your files do not belong to this project".

Upvotes: 0

The only thing that helped me was shutting down PhpStorm, removing the .idea folder and re-opening the project by dragging the root folder to PhpStorm (on a Mac).

Upvotes: 1

LazyOne
LazyOne

Reputation: 165501

This color usually means that such files are not part of the project itself.

In you case this means that the folder is excluded and then re-added back to the project as External Library (via PHP | Inlude paths functionality) -- this way you do not see ToDos from them in your ToDo list; your own code refactoring does not affect/mess up with libraries and other stuff like that.


You can edit colors at Settings/Preferences | Appearance & Behavior | File Colors.

That particular color belongs to "Non-Project Files" scope.

Few options here.

  • Change color of that scope entry (by double clicking on it) to any other that would fit your color scheme better.

  • Disable highlighting files in Project View using background colors by unchecking the Use in Project View option.

  • Use another GUI Theme that already provides more suitable/right colors.

Upvotes: 18

Related Questions