I'm starting a plugin for ST2 which suggests code completion when hitting the colon ':' key. I keep on finding examples using on_query_completions, however this method is not included in the API reference, and this code never gets triggered on the colon key, but only on other keys:

on_query_completions returns a list of 'snippets', even if they are just words.

Alternatively, you can just create a 'sublime-completions' file. This is a list of words and/or snippets, which can have a scope to only display for certain files. Have a look at the 'PHP.sublime-completions' file. This approach is simpler but doesn't give the control that 'on_query_completions' does.

"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.