I accidentally created a file with no extension and I chose the wrong file type association. Text Document I think. I renamed it to have the .js extension which is what I
In Settings
(or Preferences
for mac) > Editor
> File Types
you can edit patterns by which a file gets associated as some type or other.
If you select the patterns for a file type you have wrongly selected (in your case Text
type) you can remove the filename pattern with which was created to associate you file's filename as a wrong type.
Then click Apply
> OK
Refer to File -> Settings -> IDE Settings -> File Types
In right select "Text files" in Reconigzed File Types then find in Registered Patterns your file and click remove your file
I've found a solution, delete (o rename as .old) the file: C:\Users\.PyCharmCE\config\options\filetypes.xml
Es: C:\Users\goofy.PyCharmCE2018.3\config\options\filetypes.xml
I have found in phpstorm that I can use the Refactor > Rename... function to associate a file of unspecified file type (e.g. a name with no extension) with a file type.
For example if I have a bash script named do_the_things I can Refactor > Rename it to do_the_things.sh which causes it to pick up the bash highlighting, then when I Refactor > Rename it back to do_the_things it keeps the bash highlighting.