     # get the initial width of the element
     initialWidth = @treeViewEl.clientWidth
     # calculate the animation duration
-    duration = Math.abs targetWidth - initialWidth / (@conf.animationSpeed or Infinity)
+    duration = Math.abs targetWidth - initialWidth / (getConfig('animationSpeed') or Infinity)
 
     # cancel any current animation
     if @currentAnimation? and @currentAnimation.playState isnt 'finished'

  # updates styling on the .tree-view-resizer and the panel element
  update: ->
    promiseNextTick().then =>
      if @conf.pushEditor
        @treeViewEl.style.position = 'relative'
        atom.views.getView(@treeView.panel)?.style.width = ''
      else
        @treeViewEl.style.position = 'absolute'
        atom.views.getView(@treeView.panel)?.style.width = "#{@conf.hiddenWidth}px"
      @resize()
    .catch error

  # show the tree view
  show: (delay = @conf.showDelay, disableHoverEvents = false) ->
    # disable hover events on the tree view when not triggered
    # by a hover event
    @disableHoverEvents() if disableHoverEvents

      @handleEvents()
      # start with pushEditor = true, we'll change it back later
      # activating the package looks much better this way
      setConfig 'pushEditor', true
      @update()
    .then =>
      # reset the pushEditor setting to the user value
      setConfig 'pushEditor', pushEditor
      @update()
    .catch error

  deactivate: ->
    # deactivating looks better with pushEditor = true
    pushEditor = getConfig 'pushEditor'
    setConfig 'pushEditor', true
    # the stylesheet will be removed before the animation is finished
    # so set minWidth on the element
    @treeViewEl.style.minWidth = '1px'
    # apply new pushEditor value, then show the tree view
    @update().then =>
      # reset the pushEditor setting to the user value
      setConfig 'pushEditor', pushEditor
      # show the tree view
      @show 0
    .then =>
      # finally dispose of everything
      @disposables.dispose()
      [@disposables, @visible] = []
    .catch error

  registerTreeView: (treeViewPkg) ->
