Can't add .icls theme file to IntelliJ - intellij-idea

I'm using IntelliJ ultimate edition, and I'm on a mac. I'm trying to install this theme. My folder structure looks as follows:
~Library/Preferences/IntelliJ/colors/Dracula.icls
the IntelliJ folder wasn't there so I created that myself. I also tried IntelliJVersionNumber and that also didn't work. IntelliJ doesn't seem to be recognizing this theme. When I go to change the theme in preferences it only shows the default ones (which ironically one of the default ones is also called Dracula)

~/Library/Preferences is not the same as /Library/Preferences. ~ stands for your user home folder, so it's actually /Users/<username>/Library/Preferences.
See the FAQ.

Related

How to share just part of the IntelliJ settings repository?

I'm testing out the Setting Repository feature, but we only want to share certain settings. Specifically, codestyles and inspections. Near as I can tell so far in playing with it, you have to share everything or nothing.
But everyone has their own keymaps and color scheme, we don't want to share those bits.
Is there a way to configure this IntelliJ feature to share just selected portions of the settings?
You can create a scheme for your project by selecting "Project" in the Code Style configuration:
When doing that, a "Project" code style file will be generated in your project tree:
You can add this file to your VCS, like Git. And everyone working with you will be able have the same settings for Code Style.

How to remove material theme (or reset to defaults) from IntelliJ / PyCharm?

I have installed Material Theme UI and it made my IDE blackish. Later I decided to remove and and removed plugin. Unfortunately, this didn't give default colors back, some parts of IDE, for example Project pane, remained blackish.
How ro recover?
How to remove material theme from IntelliJ / PyCharm?
you can go to the Preferences->Plugins on the search bar, type Material UI
then press on the Uninstall button .
You should:
Go to Settings->Plugins and remove Material UI plugin
Switch to Default theme in Settings->Editor->Color Scheme
If it does not help (it happened to me) and you still have some colors/fonts from removed Material UI - looks like Material UI theme override some default colors. You should then close Intellij, go to Intellij config folder (on Windows it is C:/Users/<your username>/.IntellijIdeaXXXX.X/config) and remove this config folder and restart Intellij. It should show you a dialog window to import settings from previous version or use defaults (like when you install Intellij and make the first start). After that everything will be switched to default colors/fonts.
From the material-theme-jetbrains repo:
File Colors stuck after uninstallation The File Status Colors feature
is also a feature that sticks outside of the realm of the plugin as it
modifies the IDE itself. Therefore when uninstalling/disabling the
plugin the colors will stuck.
If you want to reset to the default colors, open the Settings at
Version Control -> File Status Colors in 2017.3+. In previous
versions, you will need to go to the config directory and delete the
_#user_Darcula.icls color scheme manually.
None of these worked for me as an acceptable solution. So here is what I figured out:
Go to plugins, uninstall Material UI.
Ensure colour scheme is Default/Darcula.
Restart Idea.
At this point most changes were back to default, but some things like colour of current tab, error highlights, modified files etc were still not back to usual. So I followed the advice of deleting config and things returned to normal. But with this option you lose everything, even the installed plugins. And worst thing was, I was using a settings repository to sync settings, few minutes later the colours were back! So I did a diff with older config directory and then a git log revealed that these files are the culprits.
Delete these 4 files from this path: .IntelliJIdea<version>/config/settingsRepository/repository/
colors/_#user_Darcula.icls
colors/_#user_Default.icls
material_custom_theme. xml
material_theme.xml
Then do a git commit and git push to ensure these are synced to your repository. And finally theme was back to normal!
Unfortunately whatever I was doing from the settings, I've couldn't get rid of that theme. So I uninstalled the program and reinstalled it again without material theme. Hope there will be better solution.
Tested with intellij 2018.3 go to settings->Type material then untick the material theme after that restart ide should fix the issue.
A tad brute force, but you could try and delete the theme directly.
Close IntelliJ
Go to: ..\JetBrains\themes
Delete Material UI
Open IntelliJ
Press Command + , (comma) (Shortcut to preferences) and search for material. Uninstall the material in plugins section.
Uninstall Material Theme UI plugin: Settings->Plugins
Delete colors from the config folder: C:\Users\User name\<.IdeaIC2018.2>\config\colors (don't remove the whole config folder because all the previous settings and tasks will be removed)
Delete material_theme file: C:\Users\User name\<.IdeaIC2018.2>\options\material_theme
If you are wondering how to do it in PHPStorm 2020.2 and above:
Settings (Alt + Ctrl + S) -> Plugins -> Uncheck the MaterialUI.
After unchecking, you would then be able to see an option to uninstall from the dropdown arrow found next to the install button.
2019 version File > Settings (or alt + f7 on windows), search for material theme ui
if you have the stupid accents persisting through uninstalling the plugin, deleting config files and so on the solution is under:
appearance and behavior > file colors > delete all of them
Another 2019 version (worked in my case):
open the settings editor (File->Settings)
search for Plugins page
inside the Plugins page, search for the Material UI plugin and uninstall it
search for Appearance & Behaviour->Appearance page
select the theme you prefer (IntelliJ or Darkula or High contrast). If your theme is already selected, chose another theme, apply the changes, than select back your preferred theme.
close IntelliJ (or PyCharm/WebStorm/etc)
open .IntelliJIdea<version>/config folder, usually it's in your home folder.
remove the following files:
material_theme.xml
colors/_#user_Darcula.icls or colors/_#user_Dafault.icls (beware: you may loose custom configurations you may have done)
Done.
This works for me in 2023.
Steps
Go to File --> Settings --> Plugins --> Go to "Installed" tab --> Search "Material Theme UI" --> Click on settings icon --> Click on "Uninstall" --> Click "Yes" in the dialog box --> Restart the IDE
Screenshot
Make sure to Restart the IDE

open same project in both webstorm and intellij and prevent asking "project file changed" window

I want to get rid of the annoying popup window when opening the same project in both webstorm and intellij. This window constains
Project components were changed externally and cannot be reloaded:
RunManager
editorHistoryManager
ToolWindowManager
ProjectRootManager
ChangeListManager
FileEditorManager
Would you like to reload project?
Is there a way to do that?
Thank you.
The problem is that WebStorm and Idea use the same project format (https://www.jetbrains.com/webstorm/help/project.html#d1374457e109), but have different module types, settings, etc. So, it's strongly recommended to avoid sharing the project settings (.idea) between WebStorm and Idea.
If you like to proceed with working on your project in both IDEs, I can suggest creating a separate project to be used in WebStorm: create a new empty WebStorm project anywhere and then add a folder where your javascript, HTML, etc. files are stored as an additional content root to it using Settings/Project/Directories, Add content root.

How to force IntelliJ to use a different home folder

I have a computer with two hard drives. In the first one, an SSD disk, I have Windows partition (C) and on the second one (D), a raid volume, I install all the programs. I also moved my user folders (desktop, documents, downloads, pictures and videos) to D:/Users/David.
After installing IntelliJ Idea on D:/Program Filles(x86) a .IntelliJIdea13 directory appeared on D:/Users/David. No problem with this as all was working nice. Then I installed Scala plugin, created a new SBT project and build it. After this, the .sbt directory used by SBT was in C:/Users/David/.sbt but the references to the libraries in my project are pointing to D:/Users/David/.sbt. The question is, how can I force IntelliJ Idea or Scala plugin to download the libraries to D:/Users/David.sbt?
Not 100% sure if this can be a solution, you can change the HOME folder of Intellij IDEA. Look for the folder where the idea executable is. In Linux I have on
~/applications/idea13/bin
On Windows you can check the properties of the menu item. There should be file idea.properties that contains the home folder location of the idea files.
You can find more information here that describe more details:
Locations can be changed by editing the following file:
IDE_HOME\bin\idea.properties
Follow the comments in idea.properties file to change the defaults,
make sure to un-comment the lines defining these properties:
idea.config.path
idea.system.path
idea.plugins.path
idea.log.path
On the other hand you can change the location of your project to D:/Users/David. you should also have a look inside the project folder, there should be a .idea folder with has a library directory. They contains the location of the libs used in the project with their paths.
As dawez allready answered, you should edit idea.properties to set config, system, plugins and log paths.
But if you want to change the user.home path, then you must edit idea.exe.vmoptions file. Just add the following at the end of the file:
-Duser.home=your_new_user_home_path
If you use idea64.exe then you should edit idea64.exe.vmoptions file.
JetBrains had added complete set of features to support such a case and this is described here:
Changing IDE default directories used for config, plugins, and caches storage

How to share Code Style settings between developers in IntelliJ

I would like all developers on my team to use the same default code style settings. We all use IntelliJ 11+ as our IDE and we use git as our source control system.
What is the easiest way to make sure they're all using the same settings? I thought there would be a way to check in the style settings into the project and have their editors discover them automatically, but that doesn't seem to be the case.
PS. I don't mind if developers consciously override some of the default settings with their own preferences, but I do want to make sure that we all at least start from a common set of default settings.
Code Style can be copied to project and saved in .idea/codeStyles to be shared via version control:
Copy to Project Click this button to create a copy of the current global scheme to the project level. After creating the copy, IntelliJ
IDEA suggests to switch to this new scheme at the project level.
The Settings Repository feature was introduced at IntelliJ IDEA 2016.
This option helps us to share IDE settings between different computers, including sharing settings between developers.
The settings are stored at Git repository, for example on GitHub or Bitbucket.
To setup Git repository we should set URL via Settings Repository menu option.
The developer can load remote settings, overwrite remote settings or merge local settings with remote ones.
The structure of Git repository with settings:
I used personal access token for GitHub authentication.
More information:
Settings Repository
Creating a personal access token for the command line
I came across this long after the fact, but thought I'd share if anyone ran into this. Add the following to your .gitignore
# IDE - IntelliJ
/.idea/*
# Keep the code styles.
!/.idea/codeStyles
/.idea/codeStyles/*
!/.idea/codeStyles/Project.xml
!/.idea/codeStyles/codeStyleConfig.xml
# Keep the inspection levels
!/.idea/inspectionProfiles
/.idea/inspectionProfiles/*
!/.idea/inspectionProfiles/Project_Default.xml
And of course, make sure your .gitignore also has a ! in front of it so these changes get picked up.
Basically, gitignore's recursive looking is a little wonky, so the below ignores a directory's contents, except for a subdirectory, then ignores that subdirectory's contents, except for the files we want.
codeStyleConfig lets you use per project settings, the project file itself is your actual code styles, and I included the Project_Default as it holds the warning levels, which you likely want if you're doing the code style work anyways.
You can create .editorconfig file in Your project (and it can be managed on directory level). More info on https://www.jetbrains.com/help/idea/configuring-code-style.html#editorconfig and https://editorconfig.org/
With this approach You can keep all Your code style settings in one file and it's not limited to IJ only.