Something was wrong with intellij.
File -> Manage IDE Settings -> Restore Default Settings (You can also do it using Ctrl + Shift + A)
When IntelliJ restarts select "Skip Import". If you import old IDE settings you will face the same issue again.
Thank you everyone for the support.