Wow, thanks for the quick and extensive reply! That helps a lot for understanding BracketHighlighter plugins.
My goal basically is a ST auto-completion plugins that also shows auto-completions for function arguments. I don’t think that can be done in the BH plugin framework (see structure of ST auto complete extensions below). I basically need the word before the last (
, which is the function name so that I can return the correct arguments. So for this code function_name(arg1=True,arg2=str(34), |
(curser at |), I need “function_name” so that I can look up the arguments and return them for as auto-completions. I can come up with something but I thought BH would be much better in finding the position of (
. Maybe I will open a ticket on github. Basically, the idea would be an ST API extension other ST packages can use.
class AutoCompletions(sublime_plugin.EventListener):
def on_query_completions(self, view, prefix, locations):
# code...
return (
("arg1", "description"),
("arg2", "description")
], sublime.INHIBIT_WORD_COMPLETIONS | sublime.INHIBIT_EXPLICIT_COMPLETIONS)