Pycharm stopped syntax highlight on files


Today for some reason Pycharm stopped syntax highlighting.

I created a file __init__ in the terminal `touch __init__` and forgot the `.py` extension. From that moment on all the files are identified as `plain text` files. Is there some way to revert back or to change the settings so that it can correctly do syntax highlighting on ``?



Please try starting with defaults by renaming/removing configuration folder Does it help?


Hi Sergey, 

When you say "Please try starting with defaults by renaming/removing configuration folder". Which folder is that specifically? This is is "/Users/johannesscr/Library/Preferences/PyCharm2018.3".

As additional information: If I create any other file with the extension ".py" the syntax highlighting is correct, it is only the that has no syntax highlighting.


Yes, for Mac OS it is 


Please rename or remove it and start with defaults. To make sure no custom plugins are causing the problem, do the same for plugins folder (~/Library/Application Support/<PRODUCT><VERSION>).


Same here. Maybe you have already solved, but for those facing this issue:

Preferences>Editor>File Types. In Recognized File Types, choose Text and remove from Registered Patterns.


@bertoldo thank you so much. Worked perfectly finally! I had lost auto-complete in every module in every environment of mine because of this thing!


Please sign in to leave a comment.