       description: 'Execute sorting CSS property on save.'
       type: 'boolean'
       default: false
+    indentType:
+      title: 'Indent Type'
+      type: 'string'
+      default: 'space'
+      enum: ['space', 'tab']
+    indentSize:
+      title: 'Indent Size'
+      type: 'number'
+      default: 2
 
   activate: (state) ->
     atom.commands.add 'atom-workspace', 'csscomb:execute', () => @execute()


    text = editor.getText()
    selected = editor.getSelectedText()

    if selected.length isnt 0
      try
        sorted = csscomb.processString(selected, {
          syntax: syntax
        })

        if isCSS
          sorted = CSSBeautify(sorted, {
            indent: '  '
          })

        editor.setTextInBufferRange(editor.getSelectedBufferRange(), sorted)
      catch e
        console.log(e)
    else
      try
        sorted = csscomb.processString(text, {
          syntax: syntax
        })
        if isCSS
          sorted = CSSBeautify(sorted, {
            indent: '  '
          })
        editor.setText(sorted)
      catch e
        console.log(e)


  isExecuteOnSave: ->
    atom.config.get('atom-csscomb.executeOnSave')

  indentType: ->
    atom.config.get('atom-csscomb.indentType')

  indentSize: ->
    atom.config.get('atom-csscomb.indentSize')

  execute: ->
    editor = atom.workspace.getActiveTextEditor()
