I need more understanding on the view.show_popup() with the parameter sublime.COOPERATE_WITH_AUTO_COMPLETE. my autocomplete has a tuple. how can i associate the value to be visible in the popup with the autocomplete?
Below is my code
def on_query_completions(self, view, prefix, locations):
tooltiptext = None
self.scope_name = sublime.windows().active_view().scope_name(sublime.windows().active_view().sel().begin())
#print("IntelliSense debug: o_q_c scope_name = ", scope_name)
if view.match_selector(locations, “source.yaml”):
currentposition = view.sel().begin() currentline = view.full_line(currentposition) text = view.substr(currentline) completion_set = self.get_autocomplete_list(prefix, self.scope_name,text)
view.show_popup(“The funds in the account that one is able to withdraw, transfer or use. It excludes any pending deposits.”, sublime.COOPERATE_WITH_AUTO_COMPLETE)
return (completion_set,sublime.INHIBIT_WORD_COMPLETIONS | sublime.INHIBIT_EXPLICIT_COMPLETIONS)
my completion_set has the thrid value in the tuple which i need to associate with the show_popup. can someone please help me with that? Please treat this as urgent as i have the deliverable for today.
Snapshot of the tuple created. The third parameter is tooltip text. it may or may not be available. if not available it would be blank.
[(‘accountActivityToDate : type : Date’, ‘accountActivityToDate: \n\ttype: Date’, ‘’),
(‘accountAdvertisementsId : type : Description’, ‘accountAdvertisementsId: \n\ttype: Description’, ‘’),
(‘accountAvailableBalance : type : Money’, ‘accountAvailableBalance: \n\ttype: Money’, ‘The funds in the account that one is able to withdraw, transfer or use. It excludes any pending deposits.’),
(‘accountAvailableCashAdvanceBalance : type : Money’, ‘accountAvailableCashAdvanceBalance: \n\ttype: Money’, ‘’)]