It often happens because sometimes user by mistake disables the setting required for producing errors or problems.
Just go to code > preferences > settings > Workspace settings and enable the required settings. It worked well for me, hope it does for you too.