Skip to content

Commit

Permalink
disable beautification of specific languages
Browse files Browse the repository at this point in the history
Created option to disable beautification of specific languages.  This is
useful when a particular language formatter is broken, but you still
want beautifyEntireFileOnSave for other languages.
  • Loading branch information
MetaMemoryT committed Nov 16, 2014
1 parent 8d76336 commit 18b0459
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/beautify.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ plugin.configDefaults = _.merge(
beautifyEntireFileOnSave: true
muteUnsupportedLanguageErrors: false
muteAllErrors: false
disabledLanguages: []
, defaultLanguageOptions)
plugin.activate = ->
handleSaveEvent()
Expand Down
2 changes: 2 additions & 0 deletions lib/language-options.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ module.exports =
# Beautify!
unsupportedGrammar = false
options = undefined
if atom.config.get("atom-beautify.disabledLanguages").indexOf(grammar) > - 1
return
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 18b0459

Please sign in to comment.