Hi,
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):
completion_set=[]
tooltiptext = None
self.scope_name = sublime.windows()[0].active_view().scope_name(sublime.windows()[0].active_view().sel()[0].begin())
#print("IntelliSense debug: o_q_c scope_name = ", scope_name)
if view.match_selector(locations[0], âsource.yamlâ):
currentposition = view.sel()[0].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â, ââ)]