I\'m creating a Grails app in IntelliJ 10 and have a javascript file that is created dynamically, as a Grails view.
For that reason the javascript file doesn\'t end
You can add additional extensions to the JavaScript in Settings
(Preferences
on Mac) | File Types
.
See also Settings
| Template Data Languages
where you can configure certain files in the project as templates producing specified language to get proper code completion.
The above answer is slightly outdated. You can do the same in IntelliJ 14 by doing the following:
Preferences
(Mac OSX : Cmd + Comma)Editor -> File Types
Recognized File Types
Highlight JavaScript files (JavaScript)
Registered Patterns
press the +
button *.js.scala.html
) and press OKCheers!