Setting grammar for new file extensions in the package


#1

I have a package, and I want to set some existing grammars to a few file extensions (package for working with salesforce).
I tried to add a /settings/config.cson file with content below

"*":
  core:
    customFileTypes:
      "text.xml": [
        "cmp"
        "design"
        "object"
        "labels"
      ]

but this isn’t work. Also, I tried advices from the discussion, but i can’t add these configs properly to the package. Please, help me with this little problem. Thanks!


#2

I found solution - including other grammar:
for example

file grammar/lightning.cson:

'scopeName': 'lightning.text.xml.basic'
'fileTypes': [
  'cmp'
  'design'
]
'patterns': [
  { "include" : "text.xml" }
]

#3

Use https://atom.io/packages/file-types