Smart indent in custom file types

Hello,

In the "File Types" settings, I created a custom file type, and assigned *.js to it (instead of assigning *.js to "JavaScript files", which makes IntelliJ too slow). These custom file types are pretty cool, you can select keywords to be given a different color, so I let it give all javascript language keywords a  highlighting color, really cool.

However there's one thing about it that's a bit of a problem: If I edit JavaScript files now and hit "enter" for a newline, it brings the cursor all the way to the left of the screen, ignoring the indentation of braces.

Is there any way at all to change the smart indent behaviour of IntelliJ for custom files and/or plain text files or just whatever file you're currently editing?

Alternatively, is there any way to assign *.js back to JavaScript files, but exclude all *.js files from being indexed and inspections?

I'm using IntelliJ 9.0.4.

Thanks!

Please sign in to leave a comment.