aparajita wrote:is it possible to disable the ST2 word (words in the document) completion list
Yes, take a look at the SublimeCodeIntel plugin:
- Code: Select all
https://github.com/Kronuz/SublimeCodeIntel/blob/master/python_codeintel.py
To trigger the autocomplete list, you run a command:
- Code: Select all
view.run_command('auto_complete', {'disable_auto_insert': True})
Passing {'disable_auto_insert': True} disables the ST2 completions.
Sorry I don't think I was very clear, I don't want to trigger the completion. What I wanted to do was effectively turn off the builtin sources if I was able to fulfil the request... which isn't currently possible as jps said, but I'll see how it goes I practice, maybe it's not as bad as it seems.
aparajita wrote:is it possible to make the completions visually distinct so at at glance you can see which of the list are functions, variables, etc.
You have to add text to the item that appears in the completion list. You can specify a separate value that is returned when the item is clicked.
I'm aware of, and already do that, what I was wondering is if there was a way to say, this is a function and an appropriate icon would be placed next to it. I was already thinking of using unicode characters so I'll experiment down that route for now which at least for functions (ƒ) looks great.
aparajita wrote:is it possible to specify which type of files a plugin should be accessible from
For event listeners you have to determine what the current file type is (by checking view.scope_name) and act accordingly.
I was hoping the editor would take care of that but this (e.g for whatever reason I get html completion in my go files) but this is workable. As long as my plugin doesn't interfere with others' I'm happy I suppose.
Thanks for yours and jps' help.