       if !@isValidEditor(item)
         @reference.hide()
     @disposables.push atom.config.observe 'atom-ternjs.inlineFnCompletion', =>
+      @inlineFnCompletion = atom.config.get('atom-ternjs.inlineFnCompletion')
       @type?.destroyOverlay()
     @disposables.push atom.config.observe 'atom-ternjs.coffeeScript', =>
       @checkGrammarSettings()

    @disposables.push atom.workspace.observeTextEditors (editor) =>
      @disposables.push editor.onDidChangeCursorPosition (event) =>
        return unless @isValidEditor(editor)
        if atom.config.get('atom-ternjs.inlineFnCompletion')
          @type.queryType(editor)
        return if event.textChanged
        @documentation.hide()

  helper: null
  provider: null
  initialised: false
  inlineFnCompletion: false

  constructor: (provider) ->
    @provider = provider
