                     username: self.config.getConfig(editor).user
                     password: self.config.getConfig(editor).password
                     success: (data) ->
-                        localFuncs = self.getLocalSuggestions(editor, prefix)
-                        variables = self.getInScopeVariables(editor, prefix)
                         resolve(variables.concat(localFuncs).concat(data))
 
         getPrefix: (editor, bufferPosition) ->


            params = util.modules(@config, editor)
            params.push("prefix=" + prefix)
            console.log("getting suggestions for %s", prefix)
            self = this
            return new Promise (resolve) ->
                $.ajax

            regex = new RegExp("^" + prefix)
            localFuncs = []
            for fn in util.parseLocalFunctions(editor) when regex.test(fn.name)
                localFuncs.push(
                    text: fn.signature
                    type: fn.type
                    snippet: fn.snippet
                    replacementPrefix: prefix
                )
            localFuncs

        getInScopeVariables: (editor, prefix) ->
            return [] unless prefix.length > 0 and prefix.charAt(0) == '$'
            ast = editor.getBuffer()._ast
            return [] unless ast?
            pos = editor.getCursorBufferPosition()
