How do I make Atom recognize a file with extension X as language Y?


Atom includes a feature called “custom file types” which you can use by adding some entries into your config.cson that look like this:

    'source.ruby': [
    'source.cpp': [

The key (for example source.ruby in the above snippet) is the language’s scope name. The value is an array of file extensions, without the period, to match to that scope name.

Edit/Set File Associations
Recognizing different file extensions (.zmc)
Modifying language-c for C++ Syntax Highlighting
Rails syntax by default?
Is there a package that support Smarty templates syntax inside *.smarty files?
Auto-detect Markdown as language for .txt files?
How to (re-)Associate .h files with Objective-C
How coding language is automatically set when the file is opened?
How to turn on / change language syntax highlighting
How to add other files for tags?
How to add php syntax highlighting to a .theme file?
Using customFileTypes to change the language for HTML
Using customFileTypes to highlight .rules as xtend
Python and not Python (Django) as default
How do I tweak grammar rules for a custom file type?
Snippets for custom file
[Solved] Default scope names
Using customFileTypes to highlight .rules as xtend