Exemple #1
0
 def on_text_command(self, view, command_name, args):
     # check if a completion may be inserted
     if command_name in config["TRIGGER_ACTION"] or command_name in config["INSERT_ACTION"]:
         self.start_tracking(view, command_name)
     elif command_name == "hide_auto_complete":
         FuzzyFilePath.completion_stop()
         self.abort_tracking()
Exemple #2
0
    def on_query_completions(self, view, prefix, locations):
        if config["DISABLE_AUTOCOMPLETION"] and not Query.by_command():
            return False

        if self.track_insert["active"] is False:
            self.start_tracking(view)

        if CurrentFile.is_valid():
            verbose(ID, "-> query completions")
            completions = FuzzyFilePath.on_query_completions(view, CurrentFile.get_project_directory(), CurrentFile.get_directory())
            if completions is not False:
                return completions

        self.finish_tracking(view)
        return False
Exemple #3
0
 def on_post_insert_completion(self, view, command_name):
     if FuzzyFilePath.completion_active():
         verbose(ID, "-> post insert completion")
         FuzzyFilePath.on_post_insert_completion(view, self.post_remove)
         FuzzyFilePath.completion_stop()