   # console.log(options);
   options
 
-beautify = ->
+beautify = ({onSave})->
   path ?= require("path")
   MessagePanelView ?= require('atom-message-panel').MessagePanelView
   PlainMessageView ?= require('atom-message-panel').PlainMessageView

    plugin.unsubscribe buffer
    if atom.config.get("atom-beautify.beautifyOnSave")
      events = "will-be-saved"
      plugin.subscribe buffer, events, beautify.bind(@)
    return
  return


  @messagePanel ?= new MessagePanelView title: 'Atom Beautify Error Messages'
  @loadingView ?= new LoadingView()
  @loadingView.show()
  forceEntireFile = onSave && atom.config.get("atom-beautify.beautifyEntireFileOnSave")
  # Show error
  showError = (e) =>
      @loadingView.hide()
