Fixing Atom’s Default File Grammar for Babel
If you’re like me you like to use
Recently Atom released an update which changes the parser that is used for detecting what type of file uses what grammar. This has the result that even with
language-babel installed, it will still default to using the old
A quick google will reveal that it can be fixed by disabling the new feature however this is a sub-optimal approach
Instead, I recommend you add this to your config.cson file (access this by searching for
Application: Open Your Config`
(Make sure you add to customFileTypes if it already exists)
Save the file and restart atom for good measure.
If that doesn’t work you can disable the new parsing feature by looking towards the bottom of settings > core and uncheck
Use Tree Sitter Parsers
When you create a new *.js file it should now automatically set the language to Babel.