     , (err) ->
       console.error 'error', err
 
-  registerEditors: ->
-    @editorSubscription = atom.workspace.observeTextEditors (editor) =>
-      @disposables.push editor.onDidChangeCursorPosition (event) =>
-        if !event.textChanged
-          @documentationView.hide()
-
   unregisterEventsAndCommands: ->
     for disposable in @disposables
       disposable.dispose()

  client: null
  documentationView: null
  activeTextEditor: null
  editorSubscription: null

  # autocomplete-plus
  registration: null

        @init()

  registerEvents: ->
    @disposables.push atom.workspace.observeTextEditors (editor) =>
      @disposables.push editor.onDidChangeCursorPosition (event) =>
        if !event.textChanged
          @documentationView.hide()
    @disposables.push atom.workspace.onDidChangeActivePaneItem =>
      @documentationView.hide()
    @disposables.push atom.config.observe 'atom-ternjs.coffeeScript', =>
