Sublime Forum

Can't inhibit default completions

#1

UPDATE 2014-07-12: I’ve completely disabled the default CSS package with Package Control, and I’ve removed my completions.py file. I’m still getting suggestions when I type Ctrl+Space. I can now rule out the default css_completions.py file as the culprit. Can anyone tell me what other sources Sublime uses to generate the auto-complete list?

I’m writing a language bundle for CSS on Sublime Text 3 and I’m stuck on the completions.py file. I’m supposed to be able to suppress the default completions by returning sublime.INHIBIT_WORD_COMPLETIONS | sublime.INHIBIT_EXPLICIT_COMPLETIONS from on_query_completions.

As you can see below, it’s not working.
https://dl.dropboxusercontent.com/u/41654/inhibit%20not%20working.png

My code couldn’t be any simpler.

[code]import sublime
import sublime_plugin

class CSSCompletions(sublime_plugin.EventListener):
def on_query_completions(self, view, prefix, locations):
print(‘called’)
return (], sublime.INHIBIT_WORD_COMPLETIONS | sublime.INHIBIT_EXPLICIT_COMPLETIONS)

[/code]

From the print(‘called’) line I can verify that it’s being called. BTW I’m on a fresh install of Sublime Text 2.0.2 on a Mac.

0 Likes