Closed swifty162 closed 1 year ago
Yes, I have had this issue for a while too, but didn't get around to fix it.
I will document how completions is done here in case you or anyone wants to tackle it
Here is how it works:
After every command is sent, the plugin executes additional q code to retrieve list of variables for completions https://github.com/komsit37/sublime-q/blob/496293b3be1b64659e7a120cd7bc46e2553a0fd7/q_event.py#L42
reads the results, and set it to global settings so sublime text can read it later https://github.com/komsit37/sublime-q/blob/496293b3be1b64659e7a120cd7bc46e2553a0fd7/q_event.py#L71
on_query_completions
handles key type event, and return possible completions
https://github.com/komsit37/sublime-q/blob/496293b3be1b64659e7a120cd7bc46e2553a0fd7/q_event.py#L17
Feel free to ask additional questions
When selecting a namespace from the predicted drop-down menu, the initial period is removed from the text. See examples below.
// a table called
.my.table
// typing below results in option for .my and also .my.table.m
// select .my.table returnsmy.table
// likewise typing.my.ta
// choose .my.table from drop-down returnsmy.table