I couldn't sleep last night, and for some reason I pictured the Mac Finder, showing me those generic icons for files that the mac simply doesn't know about. You know what I mean:

I wanted things to look sexier, so I read this post on SuperUser.com and modified it a bit to fit better with MacVim. Here's what I did:

First, you've gotta get yourself an ICNS file. I grabbed the PNG from the main Scala website and used this web app to convert it to an ICNS file. To save you the trouble just grab it here.

Next, you've gotta modify MacVim's Info.plist file (located at /Applications/MacVim.app/Contents/Info.plist) by adding this:

<dict>
    <key>CFBundleTypeExtensions</key>
    <array>
        <string>scala</string>
    </array>
    <key>CFBundleTypeIconFile</key>
    <string>MacVim-scala</string>
    <key>CFBundleTypeName</key>
    <string>Scala File</string>
    <key>CFBundleTypeRole</key>
    <string>Editor</string>
    <key>LSIsAppleDefaultForType</key>
    <true/>
</dict>

You stick this somewhere inside here:

<dict>
    <key>CFBundleDocumentTypes</key>
    <array>
  ...

There are a ton of these in there, so you shouldn't have a tough time finding it.

Next, copy the ICNS file file into /Applications/MacVim.app/Contents/Resources.

Log out and log back in (or whatever better hack you know how to do in order to get the OS to see the change), and you should start seeing things like this:

and this:

Yeah, it's a bit excessive, but hey... I really couldn't sleep.