customFileTypes not working?


#1

My config.cson basically looks like this:

"*":
  core:
    customFileTypes:
      "source.json": [
        "conf"
      ]
      "text.html": [
        "block"
      ]

But even after restarting Atom, when I open something like navigation.block, there is no syntax highlighting and it still thinks the grammar is “Plain Text”.

Can anybody help?

Update: new “.conf” files now highlight correctly but new “.block” files do not.


#2

Is that the entire contents of your config.cson?

Have you read the Flight Manual section on Basic Customization, especially the warning box about duplicate keys?


#3

Just checked and I have no duplicate keys. Maybe it has to do with the fact that Atom doesn’t know what a “.block” file is? (also notice my “Update” that .conf files now highlight correctly)


#4

The whole point of this system is to teach Atom what a “block” file is. I found the problem though:

You didn’t match the scope name.