I tried all the solutions mentioned above. But none of them worked. Then I just rm -rf'ed the .idea file for my project and somehow that fixed everything. I think it has to do with the cached config files that .idea stores. Restarting it works somehow. I also tried invalidate caches but somehow that did not do it. So I wonder why removing the .idea somehow works but invalidating cache's doesn't