Skip to content

Commit

Permalink
See #141, #118. Fix bug in disabling beautification by language
Browse files Browse the repository at this point in the history
Also add documentation on `disabledLanguages` package option
  • Loading branch information
Glavin001 committed Nov 16, 2014
1 parent 92e1aa7 commit ba1e00f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion lib/language-options.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ba1e00f

Please sign in to comment.