PhpStorm hides only node_modules for every project - phpstorm

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?

Related

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.

How to disable version control in phpstorm?

I am playing around with phpstorm and somehow I activated version control. I don't need it. Now all my tabs are different: orange text on gray background. All files in the file view are orange. How do I disable version control?
Go to Settings -> Version Control and remove the folder from which you would like to remove version control tracking (coloring tabs etc.) It will naturally not remove version control from your project (as in deleting the .git/ folder for instance).
The ultimate way is to disable all version control plugins (under Settings -> Plugins): CVS Integration, Git Integration, GitHub, hg4idea, Perforce Integration, Subversion Integration. After restarting PhpStorm Settings -> Version Control tab will be gone.
Note that this will disable version control for all of your projects.
You can just remove vcs.xml from .idea folder and then restart PhpStorm
In phpStorm 2022.1.3+, go to
Preferences > Version Control > Directory Mappings
Then remove the directories you don't want to watch, as Greg suggested.
Go to Settings -> Version Control and remove the folder from which you would liek to remove version control.
I have not enough reputation to +1 Greg's answer or comment, but... for those who are interrested : the same goes for Webstorm.
I had this problem and I used from 2 of notes in these answers in these page together.
As Greg has mentioned in one of replies, your git repository is in .git sub directory inside directory that you want to manage it with version control system. When you define a git repository, PhpStorm automatically generate it and with creating this sub directory, it adds a file for handling mapping between itself and version control system. It calls vcs.xml and it's located in .idea sub directory.
It's not enough to remove only .git directory. When you remove .git, you will get an error in PhpStorm every time that you open your project due to not matching vcs.xml for mapping between PhpStorm and git repository of your project. So after removing .git directory, you must also remove vcs.xml files from .idea and now you won't have any error or warning in your PhpStorm.
It doesn't need to restart PhpStorm at all and after this, colors of all of files that was mentioned in questions return to normal colors in PhpStorm.

How can I create a new theme for Mercurial or HgWeb?

I have a couple of Mercurial installations running on IIS7 on a 2008 server. I'd like to use the monoblue theme style for both of them, but I want to change the colour of the second one.
To accomplish this, I copied the monoblue theme, and it’s related static files and renamed it to monored. I adjusted the header.tmpl file to point at the new style-monored.css file in the static folder and updated the site's hgweb.config to reference my new theme, monored. I’ve done this in both the files in the site itself (in the template folder) and also in the Mercurial installation folder, C:\Program Files (x86)\Mercurial.
However, when I update the hgweb.config file, all that happens is that the theme reverts to paper (the default). I’m obviously missing something, but I can’t find any information on the web that points to what I’m missing out. Effectively, bar the change to the header.tmpl to reference the style-monored.css file in the static directory, the only other change I’ve made is to change the monoblue colour in the css file to a red variation i.e. #006699 became #996600.
Anyone out there got any ideas on what I’m missing out on changing. I’ve also investigated my Python installation to see if there were any Mercurial references in it, but I couldn’t find any.
FYI: My Python installation is from the Windows (x86) specific Python-2.7.5.msi
My Mercurial installation is from the Windows (x86) specific Mercurial 2.6.2 MSI installer.
In my travels about the Googlesphere, I’ve discovered the following two websites that have "instructions" on how to adjust/edit Mercurial templates. I’ve followed these, but to no avail.
http://www.endswithsaurus.com/2010/05/setting-up-and-configuring-mercurial-in_3404.html
http://colas.nahaboo.net/Hacks/HgwebMercurialTemplateCustomization
Any help would be greatly appreciated.
Thanks.
UPDATE: I found the answer to my question. All the template files I was making changes to are ignored by Mercurial. The correct template files to copy and edit are to be found in the \Python27\Lib\site-packages\mercurial\templates directory. I chanced upon this when I was re-reading my installation documentation on an unrelated matter.
The answer to this question is that the template files that Mercurial references to modify the display are to be found in the \Python27\Lib\site-packages\mercurial\templates directory. I discovered this when I re-visited the documentation I'd created as I installed Mercurial onto my Windows 2008 R2 server.

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

Adding an external project directory in phpStorm 6.0 to keeping workspace files separated from code?

I am try to keep separate workspace directory and code directories in my php project and sweating to understand/find how this could be achieved. A couple of revisions back I tried phpStorm and found that it does not provide such feature.
I just want to know if phpstorm 6.0 has this feature or still lacking it ? If possible please help me out.
Work Around
File > Settings >[Directories]
+[Add Content Root] to add external directory
Assuming that you have created project separate from code.Some of the tool might not work
as expected
This works for linux using sshfs, sorry for windows users.
I've created this folder structure in my pc
/mnt/remote_code/code/
And i have to mount code from server like this
sshfs user#server:/var/www/server_code/ /mnt/remote_code/code/
Code from server will be mounted in code folder
In PS I open this directory: /mnt/remote_code/
So, that means PS will create this folder /mnt/remote_code/.idea (indexing and saving all project and ide settings), and keeps the code folder (with remote code inside) without changes.
Hope it help you.
Greetings.