How to set and save language syntax type in .babelrc file
In Atom 1.18, every time I open an editor, the .babelrc file is of the file type by default JSON
, which does syntax highlighting. And I have to keep changing it to type Babel
.
How to fix (temporarily):
Have to reset every time the .babelrc file is closed and opened.
Now I understand that this is a file that will rarely be affected, but it would be helpful to know how to fix this for a different file type.
+3
source to share
2 answers
There is a very specific way to set this in config.cson
https://discuss.atom.io/t/how-do-i-make-atom-recognize-a-file-with-extension-x-as-language-y/26539
http://flight-manual.atom.io/using-atom/sections/basic-customization/#configuring-with-cson
"*":
core:
customFileTypes:
"source.js.jsx": [
"js"
"es6"
"es"
"babel"
"babelrc"
"jsx"
]
+1
source to share