I downloaded multiple different packages for Swift autocomplete. How does Sublime choose which package to use? Does it use all of them? If so, what happens when there’s a conflict (2 package providing the same autocomplete hint?)
Multiple packages for same purpose
kingkeith
#2
All packages are loaded at once, and decide when to react to events etc.
Two packages providing the same autocomplete hint will show duplicate hints, as can be proven with a simple test plugin:
import sublime
import sublime_plugin
class Example1(sublime_plugin.EventListener):
def on_query_completions(self, view, prefix, locations):
return [('abc', 'abc'), ('ghi', 'ghi')]
class Example2(sublime_plugin.EventListener):
def on_query_completions(self, view, prefix, locations):
return [('ghi', 'ghi'), ('abc', 'abc'), ('def', 'def')]
4 Likes