         symbolType=='type' or symbolType=='class'),
         prefix, key: 'qname'
 
+  ###
+  getCompletionsForClass(buffer,prefix,position)
+  buffer: TextBuffer, current buffer
+  prefix: String, completion prefix
+  position: Point, current cursor position
+
+  Returns: Promise([symbol])
+  symbol: Same as getCompletionsForSymbol, except
+          symbolType is one of ['class']
+  ###
   getCompletionsForClass: (buffer, prefix, position) =>
     return Promise.reject("Backend inactive") unless @isActive()
 

      FZ.filter (symbols.filter ({symbolType}) -> symbolType=='class'),
        prefix, key: 'qname'

  getCompletionsForModule: (buffer, prefix, position) =>
    return Promise.reject("Backend inactive") unless @isActive()
    rootDir = @process.getRootDir buffer

  onDidDestroy: (callback) =>
    @process.onDidDestroy callback if @isActive

  ###
  registerCompletionBuffer(buffer)
  Every buffer that would be used with autocompletion functions has to
  be registered with this function.

  buffer: TextBuffer, buffer to be used in autocompletion

  Returns: Disposable, which will remove buffer from autocompletion
  ###
  registerCompletionBuffer: (buffer) =>
    @bufferMap.set(buffer, new BufferInfo(buffer, @process))
    new Disposable =>
      @unregisterCompletionBuffer buffer

  ###
  unregisterCompletionBuffer(buffer)
  buffer: TextBuffer, buffer to be removed from autocompletion
  ###
  unregisterCompletionBuffer: (buffer) =>
    @bufferMap.get(buffer)?.destroy()
    @bufferMap.delete buffer

  ###
  getCompletionsForSymbol(buffer,prefix,position)
  buffer: TextBuffer, current buffer
  prefix: String, completion prefix
  position: Point, current cursor position

  Returns: Promise([symbol])
  symbol: Object, a completion symbol
    name: String, symbol name
    qname: String, qualified name, if module is qualified.
           Otherwise, same as name
    typeSignature: String, type signature
    symbolType: String, one of ['type', 'class', 'function']
    module: Object, symbol module information
      qualified: Boolean, true if module is imported as qualified
      name: String, module name
      alias: String, module alias
      hiding: Boolean, true if module is imported with hiding clause
      importList: [String], array of explicit imports/hidden imports
  ###
  getCompletionsForSymbol: (buffer, prefix, position) =>
    return Promise.reject("Backend inactive") unless @isActive()

    @getSymbolsForBuffer(buffer).then (symbols) ->
      FZ.filter symbols, prefix, key: 'qname'

  ###
  getCompletionsForType(buffer,prefix,position)
  buffer: TextBuffer, current buffer
  prefix: String, completion prefix
  position: Point, current cursor position

  Returns: Promise([symbol])
  symbol: Same as getCompletionsForSymbol, except
          symbolType is one of ['type', 'class']
  ###
  getCompletionsForType: (buffer, prefix, position) =>
    return Promise.reject("Backend inactive") unless @isActive()

