ternjs / tern_for_sublime

Sublime Text package adding Tern support
MIT License
803 stars 54 forks source link

Add tern_inhibit_word_completions config option #163

Closed nickw444 closed 7 years ago

nickw444 commented 7 years ago

It doesn't make sense to have buffer completions when tern is configured correctly and providing accurate file and project-level completions.

This PR makes the plugin configurable to allow buffer-based completions to be disabled.

Docs for functionality:

([[trigger, contents], ...], flags) Basically the same as above but wrapped in a 2-sized tuple. The second element, the flags, may be a bitwise OR combination of these flags:

sublime.INHIBIT_WORD_COMPLETIONS Prevents Sublime Text from adding its word completions to the completion list after all plugins have been processed. This consists of any word in the current document that is longer than 3 characters.

http://docs.sublimetext.info/en/latest/reference/api.html#sublime_plugin.EventListener.on_query_completions

marijnh commented 7 years ago

Makes sense. Merged!