 
   # enable hover events on the tree view
   enableHoverEvents: ->
-    if @conf.showOn.match 'hover'
+    if getConfig('showOn').match 'hover'
       @treeViewEl.classList.add 'autohide-hover'
 
   # disable hover events on the tree view
   disableHoverEvents: ->
-    if @conf.showOn.match 'hover'
+    if getConfig('showOn').match 'hover'
       @treeViewEl.classList.remove 'autohide-hover'
 
   # resolves true if animation finished, false if animation cancelled

      @treeView.focus() if finished

  # hide the tree view
  hide: (delay = @conf.hideDelay) ->
    @visible = false
    # enable hover events again
    @enableHoverEvents()
    # focus the element that was focused before the tree view
    # was opened
    @recoverFocus()
    @animate @conf.hiddenWidth, delay
    .then (finished) =>
      # hide the tree view content
      @treeView.scroller[0].style.display = 'none' if finished

  new Promise (resolve) ->
    process.nextTick ->
      resolve()

getConfig = (key) -> atom.config.get "autohide-tree-view.#{key}"

setConfig = (key, value) -> atom.config.set "autohide-tree-view.#{key}", value

class AutohideTreeView
  config:
