syntax highlighting issues
At some point I created a file without the .py file extension. When I realized my mistake i renamed the file to include the .py. However, it seems once PyCharm has decided a file doesn't need syntax highlighting, you aren't going to get syntax highlighting.
I've cleaned and restarted the system cache, and haven't had any luck. any suggestions?
Please sign in to leave a comment.
Hello,
could you please attach a screenshot of the file opened in the editor? Please make sure the .py is associated with Python in Type Association settings https://www.jetbrains.com/help/pycharm/creating-and-registering-file-types.html
.py is in the type associations.
Do you have this file name associated with text type format by any chance?
Could you please try re-creating it?
I'm sure that has something to do with it, because if I change the name I get highlighting, but as soon as I change it back it goes away. I don't see it in the file types.
It worth checking the other types associated with the text icon. Please try
to start IDE with default settings as described here https://www.jetbrains.com/help/pycharm/configuring-project-and-ide-settings.html#restore-defaults
restoring defaults worked. thank you,.