Adding support for formatting the current selection(s)
Adding 'format on save', enabled by default
Use file's grammar to detect if it can be formatted.

Because the file extension may not always accurately describe a file's contents,
use the file's grammar. The user can now manually set the grammar of a file that
doesn't end with .json or .js and it can be formatted.

Also using the grammar to detect validity covers other javascript file
extensions such as .es6 and .jsx.