I like to separate the location of my IDE project configuration files/dirs from the actual project source code. The way I used to do it in Eclipse was to locate the workspace config in /home/myuser/dev/ide-conf/myproject and the source code in /home/myuser/dev/project/myproject. That way, the IDE workspace configuration files do not clutter the same directory where the root of the project is for version control exclusion (without explicitly ignoring them) and it just is cleaner.
I tried to do the same in IntelliJ but was not able to. When I created a new project, it only asked me where the project location should be. I was hoping that would be the location where IntelliJ would just store the project configuration (the <MY_PROJECT>.iml file and the .idea directory) but it also situated the src directory there without asking me if I wanted to point to a different source code location.
Is there a way to set project IDE config in a different directory from project codebase root?