WebStorm’s Autocomplete not working for one exact file (treated as plain text)?

My WebStorm’s autocomplete stopped working today.

I made a new component and wanted to call it ProductArticleManager as it’s the most fitting name for it.

enter image description here

However, the Autocomplete for that single file just refuses to work. Looks like the IDE can’t recognize it as a JS file.

I also made another folder called NewComp and made a component NewComp.js to check if it has anything to do with filename matching the folder name, but NewComp.js works fine.

Is there something wrong with this particular name?

What i already did after a little googling:

  1. Restarted the IDE and computer, of course.
  2. Checked that Power Saving Mode is off.
  3. Tried File => Invalidate Cache / Restart option.
  4. Right clicked on the root folder and set it as Resource Root.
  5. Renaming the working test.js file to ProductArticleManager.js turned off the Autocomplete.
  6. Moving the entire folder to another folder.
  7. Deleting ProductArticleManager folder and re-creating it didn’t work either.

I work in Ubuntu v20.04, WebStorm v2020.3.

Answer

Looks like the file is treated as plain text.

Please check the registered patterns in Settings | Editor | File types -> Text and Auto-detect file type by content file types – can you see ProductArticleManager.js there? Removing this pattern from the list should help

enter image description here

Leave a Reply

Your email address will not be published. Required fields are marked *