def on_query_completions(self, view, prefix, locations):
        sel = view.sel()[0].a
        completions = []

        # Do not trigger if we are in a string or comment
        pt = locations[0] - len(prefix) - 1
        if any(s in view.scope_name(pt) for s in ["string","comment"]):
            return

        if any(s in view.scope_name(sel) for s in self.valid_scopes_tags):
            for region in view.sel():
                pos = region.begin()

                tagdata = view.substr(sublime.Region(0, pos)).split("<")
                tagdata.reverse()
                tagdata = tagdata.pop(0).split(" ")
                tagname = tagdata[0]

            if tagname in self.cflib.completions.keys():
                completions = self.cflib.completions[tagname]['completions']

        if completions == []:
            return
        return (completions, sublime.INHIBIT_WORD_COMPLETIONS | sublime.INHIBIT_EXPLICIT_COMPLETIONS)
dataset/ETHPy150Open SublimeText/ColdFusion/coldfusiontagcompletions.py/TagAttributeAutoComplete.on_query_completions/original