Restoring syntax highlighting in Intellij

Found and fixed an annoying intellij bug recently.
Intellij was having severe stability problems, so I was turning off all plugins and wiping the cache to try to resolve the issues. As a side effect of this, Intellij lost the ability to highlight java server pages and javascript files.

This is because the plugins for inspecting those files were disabled when you first load the project. Intellij will assign those file types to be treated as plain text. Then when you turn on the jsp and js inspection plugins, Intellij will not go back and associate the plugin with these industry standard file types/file extensions. (That’s a bug in my book.)

However, you can go in and fix this yourself:

Settings > File Types > Java Server Page files > Add *.jsp

Settings > File Types > Javascripts files > Add *.js

Ditto for any other files that have lost their syntax highlighting, even though the appropriate plugin has been enabled.

This entry was posted in Tips and tagged . Bookmark the permalink.

One Response to Restoring syntax highlighting in Intellij

Leave a Reply

Your email address will not be published.