I implemented a customized autocompletion plugin for SublimeText:
import sublime_plugin
import sublime
test = ["class.test", "class.okok"]
class TensorflowCompletions(sublime_plugin.EventListener):
def __init__(self):
self.test_completions = [("%s \tCustom completions" % s, s) for s in test]
def on_query_completions(self, view, prefix, locations):
if view.match_selector(locations[0], "source.py"):
return self.test_completions
else:
return []
So I added this python file into the User folder into Packages folder. Then I restarted Sublime Text but when I type “class” it doesn’t suggest my customized autocompletion list.
Did I do something wrong ?