title: IntelliJ: how to force editor to treat a file as javascript?
body: <p>I'm creating a Grails app in IntelliJ 10 and have a javascript file that is created dynamically, as a Grails view.</p>
  
  <p>For that reason the javascript file doesn't end in '.js'.  It ends in '.gsp' because it's a Groovy Server Page that spits out javascript.</p>
  
  <p>IntelliJ doesn't know it's a javascript file so it doesn't give me code completion or warnings.  </p>
  
  <p>I want my code complete and syntax checking!  Is there a way to force IntelliJ to treat this specific file as Javascript, WITHOUT messing up the IntelliJ's correct treatment of .gsp files everywhere else?</p>
  
  <p>Thanks!</p>