Remember Syntax Highlighting (again)


#1

Hello,
I’m trying to make behave a “file.som” like a “file.xml” (instead of a plain text).
I searched and I figure out that the most ‘modern’ method to doing it is to add few lines in the 'config.cson’
these are the lines:
"*": # make sure to put all "file-types" options under the "*" key "file-types": "hbs": "text.html.htmlbars"
now do I have to change “som”: “xml” in the last line?
It doesn’t work in this way!
And where exactly I have to put these lines?
Here my config.cson

"*": core: {} editor: fontSize: 15 scrollPastEnd: true showIndentGuide: true tabLength: 4 "exception-reporting": userId: "5a3481846-5802-62b7-8b82-9ea53629b3bd" minimap: absoluteMode: true "split-diff": diffWords: true ignoreWhitespace: true leftEditorColor: "red" rightEditorColor: "green" syncHorizontalScroll: true "tree-view": hideVcsIgnoredFiles: true welcome: showOnStartup: false

thanks


#2

You can put them anywhere under the "*" key. Keep in mind that indentation is important in CSON, so it has to be on the second level.

You don’t even need the package to accomplish this. You can do it with Atom’s core functionality as detailed here.


#3

thanks for the right link! I added
core: customFileTypes: "text.xml": [ "som" ]
And finally it works!
Thanks again


#4

No problem. :slight_smile: