disable beautification of specific languages

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.
This commit is contained in:
Sean Usick 2014-11-15 18:24:33 -06:00
parent 8d76336b77
commit 18b04595e5
2 changed files with 3 additions and 0 deletions

View File

@ -318,6 +318,7 @@ plugin.configDefaults = _.merge(
beautifyEntireFileOnSave: true
muteUnsupportedLanguageErrors: false
muteAllErrors: false
disabledLanguages: []
, defaultLanguageOptions)
plugin.activate = ->
handleSaveEvent()

View File

@ -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.