My directory in PhpStorm have yellow background - phpstorm

My directory in PhpStorm have this yellow contrast. What can I do to remove this?

Welcome to StackOverflow, Matheus!
Your .idea directory which contain PHPStorm project settings seem to be corrupted. This dark-yellowish background marks files that do not belong to your project.
Try deleting .idea from outside your IDE using rm -rf .idea and reopen your project with File > Open..
Another way PHPStorm provides to solve issues like this could be using File > Repair IDE..
As this question seems to be a duplicate, I also found this useful stackoverflow answer.

Related

How to run PhpStorm and WebStorm in a single directory?

I am currently working on a project which requires PhpStorm and WebStorm to work in a single directory. However, the issue is that their respective .idea directories collide.
Is there any way to solve this issue?

File doesn't belong to this project - PhpStorm

UPDATE
Asked the question on the PhpStorm site.
When I press Ctr + Shift + N to navigate in my project files it can only find some off my files in the directory. So most off the files do not belong to the project. How to make it so my directory with all the files becomes 1 project again?
Also it looks like some off the files are on C:\Users\Username\Projects\Website and other files are on Z:\Projects\Website
It's a short question I hope I explained it right, and if I need to give more information about something ask/tell me. (also I don't know which tags I have to use)
If someone is experiencing this problem with the PhpStorm 2021 version, try these steps:
Close the IDE.
Go the project directory and delete .idea folder.
Restart the IDE.
For me, the IDE created a new .idea folder and recognized all files as the part of the project.
Did you try reopening the project? That sometimes does solve my problems.

PhpStorm hides only node_modules for every project

I tried updating, I tried removing .idea folders from the projects. I even deleted my whole settings folder from users/User in Windows. Last one helped, but I had to import my old settings, there is just far too much changed for me to redo everything, problem reappeared.
While indexing, PhpStorm shows the node_modules folder. Right after it finishes, the folder disappears. I have no scopes set up, I have not excluded the folder.
I followed this issue PhpStorm hides directories in Project window and it didn't help.
If I setup node_modules as a source folder from the Directories settings, and then choose "Project Files" from the Project View, then and only then I can see it in the sidenav... This is driving me nuts...
I disabled "Vue for Idea" plugin and node_modules reappeared. I feel so stupid right now....
Thanks to Alexandre Martini in the comments. He gave me a hunch.
This shit drove me crazy to - Go to File > Settings > Frameworks > Javascripts > Libraries and make sure you have a library setup pointing to your project's node_modules folder and the visibility is enabled. This link helped me.
[How to configure WebStorm / PhpStorm project so that JS code intelligence works well for Node.js projects?

How to set highlighting of directories with added files to red/blue

I'm using PhpStorm 8.0.3 (on Windows, MacOs and Linux). I'm using GIT in my project. My remote server is through SSHFS.
I know option "Show directories with changed descendants". I've marked it. But when I'm adding new files (they are marked on red in project tree view), parents of these directories are not highlighted/marked (such directories have normal, white color). How can I change it?
Thanks.
Please vote for IDEA-138890 to be notified on any updates

My intellij java project can't find misc.xml

I have a java project in Intellij and use Hg/Mercurial for version control. I ignored some files with this .hgignore file
syntax: glob
target/*
.idea/*
*.iml
and deleted all these files which was committed before. but now I can't execute my project, cause it can not find the file misc.xml.
What should I do?
Updated answer for IntelliJ 14+: File-> New-> Project from Existing Sources... (choose your project directory) and follow the wizard Q&A.
Restarting Intellij should fix the problem. Just make sure you click on the "Import Project" pop-up that appears on the top right.
At first, you shouldn't really ignore everything under .idea but instead only .idea/workspace.xml and .idea/tasks.xml, as it JetBrains states: http://devnet.jetbrains.com/docs/DOC-1186
To solve your problem and get your project back to working state there are possibly two solutions:
Checkout the last commit that contains the files under .idea folder with
hg checkout SHA,
where SHA is the commit id.
After that reset your working space to the head:
hg reset HEAD
Edit your .hgignore in the way that was recommended before, add project files to stage, and commit them:
hg commit -am "Reverted project settings"
If there is no commit with the project settings, you can just import your code back.
Start Intellij IDEA and choose "Import Project". Choose the folder with your code, and choose the appropriate SDK after.
I met this problem when I did rm -rf project command, then when I git clone a new project to my working space, maybe quit the idea and then import the project again. This can easily solve this
I have found that for this error and also for some other cases where the IDE project behavior is inconsistent with command line behavior, the following often helps: close the project's Intellij IDEA window, delete .idea/, and open the project again. IntelliJ often flashes up a message saying it didn't find a project root but generally this disappears after a few seconds and IntelliJ automatically rebuilds the .idea directory.
Recreating the .idea folder
File -> Close project
File -> Open -> Choose pom.xml under the project folder -> Open as project -> Delete existing project and import