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?

6 comments
Comment actions Permalink

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

0
Comment actions Permalink

.py is in the type associations.

 

0
Comment actions Permalink

Do you have this file name associated with text type format by any chance? 

Could you please try re-creating it?  

 

0
Comment actions Permalink

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.

0
Comment actions Permalink

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

0
Comment actions Permalink

restoring defaults worked.  thank you,.

0

Please sign in to leave a comment.