See #141, #118. Fix bug in disabling beautification by language

Also add documentation on `disabledLanguages` package option
This commit is contained in:
Glavin Wiechert 2014-11-16 10:28:20 -04:00
parent 92e1aa7a5d
commit ba1e00fb80
2 changed files with 6 additions and 1 deletions

View File

@ -93,6 +93,11 @@ However, when beautification occurs on save then it will
be forced to beautify the entire file's contents,
not just selected text.
- `disabledLanguages` (Default *empty array*)
An array of Grammar names to disable beautification for.
Note: If using the Atom's Package Settings then an array is
represented as comma-separated string.
- `muteUnsupportedLanguageErrors` (Default *false*)
Mute only *unsupported language* errors.

View File

@ -156,7 +156,7 @@ module.exports =
unsupportedGrammar = false
options = undefined
if atom.config.get("atom-beautify.disabledLanguages").indexOf(grammar) > - 1
return
return beautifyCompleted(null)
switch grammar
# Treat JSON as JavaScript, because it will support comments.
# And Glavin001 has tested JSON beauifying with beautifyJS.