Atom customFileTypes not working

I’ve just installed Atom 1.25.1 on MacOS.
As there’s built-in xml files support and customising additional file types I’ve changed config.cson to this:

"*":
  core:
    customFileTypes:
      "text.xml": [
        "kml"
      ]

But when I opening .kml file it’s not highlighted. .xml file highlighted normally.
What am I doing wrong?

Please remember to mark code as code (highlight it and press the </> button above the editor) so that we can see what your indentation looks like.

Sorry, it wasn’t work when I created post.
Updated…

It works for me.

I had this issue. And while it looks like you have done it correct in the post above it might be indentet different in you editor. Mine was.
It turned out that i had one space of indentation wrong in the config.cson file and it did not work.

I had:

"*":
  core:
  customFileTypes:
      "text.xml": [
         "kml"
      ]

but should have had:

"*":
  core:
      customFileTypes:
          "text.xml": [
             "kml"
          ]

Be sure the indentation is correct.

1 Like