Sublime Forum

[solved] How to programatically add auto completions?


I would like to provide autocompletions much like snippets that are triggered as you type. It should also show as pop up autocompletion.

The words are provided by my plugin as a list.

I have a sample plugin but couldn’t exactly find out how it is done. It seems to use a text command and view.insert and it is triggered every time a sequence of characters is entered.



If you want to programmatically provide auto completions, you will need to look in to on_query_completions of sublime_plugin.EventListener or sublime_plugin.ViewEventListener depending on your needs.

Here are the docs for it

Here is also a good video that describes in detail about this API endpoint.