How to stop or limit indexing in IntelliJ 13?
Starting from IntelliJ 2017.2, indexing can at least be paused:
Actually, I found what was wrong. Once of my modules didn't have the target folder excluded and that was causing IntelliJ to always index and since that module is big it would take forever to index it.
Solution: Go to "Project Structure" -> "Modules" and excluded all target folders.